/* Login page - shared dark gradient theme
   Self-contained: includes variables, reset, and all login UI */
:root {
    --font-primary: "Instrument Sans", -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    --font-body: "Instrument Sans", -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    --color-primary: #00244d;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: var(--font-body);
    line-height: 1.6;
    background: linear-gradient(135deg, #00244d 0%, #116090 50%, #379bd7 100%);
    background-image: linear-gradient(
            rgba(18, 35, 70, 0.6),
            rgba(18, 35, 70, 1)
        ),
        url("/assets/catalina-palms-bg.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
}
.footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}
.footer a:hover {
    color: #fff;
    text-decoration: none;
}
.login-back-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}
.login-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-box {
    background: rgba(255, 255, 255, 0.08);
    padding: 2.5rem 3rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
}
.login-logo {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}
.login-logo img {
    height: 20px;
    width: auto;
}
.login-title {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}
.login-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.login-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #1a1a1a;
    font-family: var(--font-body);
    text-align: left;
}
.login-input::placeholder {
    color: #888;
}
.login-input:focus {
    outline: none;
    border-color: var(--color-primary);
}
.login-input-wrap {
    position: relative;
}
.login-input-wrap .login-input {
    padding-right: 3.5rem;
}
.login-pw-toggle {
    position: absolute;
    right: 12px;
    top: 0;
    height: 100%;
    width: 3rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.login-pw-toggle::after {
    content: "SHOW";
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #555;
}
.login-pw-toggle:hover::after {
    color: #1a1a1a;
}
.login-pw-toggle.visible::after {
    content: "HIDE";
}
.login-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    position: relative;
    text-align: left;
    font-family: var(--font-body);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.login-btn::after {
    content: "";
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 15px;
    background: url("https://a.akel.co/sites/5/2025/12/arrow-right-white.svg")
        no-repeat center / contain;
    opacity: 0.7;
    transition: none;
}
.login-btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.login-btn:hover::after {
    opacity: 1;
    filter: none;
}
.login-error {
    color: #ff4d6a;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}
/* ── Post-login nav (root index when authenticated) ───────────────── */
main {
    text-align: center;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
main .login-logo {
    margin-bottom: 2rem;
}
.welcome-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 1.5rem;
}
nav {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
    max-width: 420px;
}
.nav-section {
    text-align: left;
}
.nav-section-title {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.6rem;
    padding-left: 0.25rem;
}
nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
}
nav a {
    display: block;
    padding: 1rem 2.5rem;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: none;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}
nav li:last-child a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
nav a:hover {
    background: rgba(255, 255, 255, 0.12);
}
.signout {
    margin-top: 3rem;
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.clear-cache-btn {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #0d1f17;
    background: #00b777;
    border: 1px solid #00b777;
    padding: 0.5rem 1rem;
    height: 36px;
    box-sizing: border-box;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 200px;
}
.clear-cache-btn:hover:not(:disabled) {
    background: #1ae99e;
    border-color: #1ae99e;
}
.clear-cache-btn:disabled {
    cursor: not-allowed;
    opacity: 0.85;
}
.clear-cache-btn.error {
    background: #ff4d6a;
    border-color: #ff4d6a;
    color: #fff;
}
.clear-cache-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: clear-cache-spin 0.7s linear infinite;
}
.clear-cache-spinner.visible {
    display: inline-block;
}
.clear-cache-btn.loading .clear-cache-text {
    display: none;
}
@keyframes clear-cache-spin {
    to {
        transform: rotate(360deg);
    }
}
.signout a {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}
.signout a:hover {
    color: rgba(255, 255, 255, 0.9);
}

.index-powered-by {
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.9);
    padding: 1rem 0 1.5rem;
    letter-spacing: 0.02em;
}
.index-powered-by strong {
    color: #fff;
    font-weight: 600;
}

/* ── Dashboard (authenticated homepage) ─────────────────────────────── */
body:has(main.dashboard) {
    align-items: flex-start;
    background-position: 40% center;
}
main.dashboard {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem 1rem;
    align-items: stretch;
    text-align: left;
}
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.dashboard-header .login-logo {
    margin-bottom: 0;
}
.dashboard-header .login-logo img {
    height: 22px;
    opacity: 0.95;
}
.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.dashboard-header .clear-cache-btn-header {
    width: 130px;
    min-width: 130px;
    max-width: 200px;
    flex-shrink: 0;
    height: auto;
    padding: 0.6rem 1rem;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.95);
}
.dashboard-header .clear-cache-btn-header:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.25);
}
.dashboard-signout {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    padding: 0.5rem 1rem;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.dashboard-signout:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.25);
}
.dashboard-welcome {
    margin-bottom: 2.5rem;
}
.dashboard-welcome .welcome-greeting {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 0.35rem;
}
.dashboard-welcome .welcome-name {
    font-size: 1.75rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.6rem;
    letter-spacing: -0.02em;
}
.dashboard-welcome .welcome-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.dashboard-welcome .welcome-date {
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.82);
}
.dashboard-role-badge {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.tool-stacks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}
.tool-stack {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.08);
}
.tool-stack-title {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
    padding: 1rem 1.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.tool-stack-links {
    display: flex;
    flex-direction: column;
}
.tool-stack-link {
    display: block;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-body);
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    transition: background 0.2s ease;
}
.tool-stack-link:last-child {
    border-bottom: none;
}
.tool-stack-link:hover {
    background: rgba(255, 255, 255, 0.08);
}
.tool-stack-link span {
    display: none;
}
.dashboard-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
@media (max-width: 600px) {
    main.dashboard {
        padding: 0 1rem 2rem;
    }
    .tool-stacks {
        grid-template-columns: 1fr;
    }
    .tool-stack-title,
    .tool-stack-link {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
/* Powered-by footer — dark background override (beats _powered-by.php defaults) */
body .powered-by {
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.35);
}
body .powered-by a {
    color: rgba(255, 255, 255, 0.45);
}
body .powered-by a:hover {
    color: rgba(255, 255, 255, 0.8);
}
body .powered-by-copy {
    color: rgba(255, 255, 255, 0.25);
}
