/* Modgile Consulting Client Portal — Terminal Theme
   Matches modgileconsulting.com: stark, bold, raw terminal aesthetic.
   No rounded corners. No pastels. Hard lines. */

/* ── Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.2rem;
    line-height: 1.6;
    color: #98FB98;
    background-color: #004010;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── Links ── */
a {
    color: #98FB98;
    font-size: 0.9rem;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Header ── */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    border-bottom: 2px solid #98FB98;
    flex-wrap: wrap;
    gap: 15px;
}

.site-header .logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-header .logo-area img {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0px 0px 5px rgba(0, 0, 0, 0.5));
}

.site-header .logo-area .site-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.site-header .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-header .user-greeting {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: bold;
}

/* ── Login Form (inline in header) ── */
.login-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.login-inline input[type="text"],
.login-inline input[type="password"] {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    padding: 6px 10px;
    background: #001a08;
    border: 2px solid #98FB98;
    color: #98FB98;
    border-radius: 0;
    width: 140px;
    outline: none;
}

.login-inline input::placeholder {
    color: rgba(152, 251, 152, 0.4);
}

.login-inline input:focus {
    background: #002a0a;
    box-shadow: 0 0 8px rgba(152, 251, 152, 0.3);
}

/* ── Buttons ── */
.btn {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 6px 18px;
    border: 2px solid #98FB98;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background: #98FB98;
    color: #004010;
}

.btn-primary:hover {
    background: #ffffff;
    color: #004010;
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: #98FB98;
}

.btn-secondary:hover {
    background: #98FB98;
    color: #004010;
    text-decoration: none;
}

.btn-danger {
    border-color: #ff4444;
    color: #ff4444;
    background: transparent;
}

.btn-danger:hover {
    background: #ff4444;
    color: #004010;
    text-decoration: none;
}

/* ── Main Content ── */
.content-wrapper {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 40px;
    flex: 1;
}

/* ── Headings ── */
h1 {
    font-size: 2.5rem;
    color: #ffffff;
    font-weight: bold;
    border-bottom: 2px solid #98FB98;
    padding-bottom: 10px;
    margin-bottom: 30px;
    letter-spacing: 0.02em;
}

h2 {
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: bold;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(152, 251, 152, 0.4);
    padding-bottom: 6px;
}

h3 {
    font-size: 1.2rem;
    color: #98FB98;
    font-weight: bold;
    margin-bottom: 10px;
}

/* ── Paragraphs ── */
p {
    margin-bottom: 15px;
}

/* ── Flash Messages ── */
.flash {
    padding: 12px 18px;
    margin-bottom: 25px;
    font-size: 0.95rem;
    font-weight: bold;
    border-left: 4px solid;
    background: rgba(0, 0, 0, 0.3);
}

.flash-error {
    border-color: #ff4444;
    color: #ff4444;
}

.flash-success {
    border-color: #98FB98;
    color: #98FB98;
}

.flash-warning {
    border-color: #ffcc00;
    color: #ffcc00;
}

/* ── File Tables ── */
.file-section {
    margin-bottom: 40px;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    margin-top: 10px;
}

.file-table th,
.file-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(152, 251, 152, 0.25);
}

.file-table th {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 2px solid #98FB98;
}

.file-table tr:hover {
    background: rgba(152, 251, 152, 0.08);
}

.file-table .col-actions {
    width: 50px;
    text-align: center;
}

.file-table .download-link {
    font-size: 1.2rem;
    font-weight: bold;
    color: #98FB98;
}

.file-table .download-link:hover {
    color: #ffffff;
}

.empty-notice {
    color: rgba(152, 251, 152, 0.5);
    font-style: italic;
    padding: 15px 0;
}

/* ── Upload Form ── */
.upload-section {
    margin-bottom: 40px;
    padding: 20px;
    border: 2px solid rgba(152, 251, 152, 0.4);
    border-radius: 0;
    background: rgba(0, 0, 0, 0.2);
}

.upload-section input[type="file"] {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #98FB98;
    margin-bottom: 10px;
}

.upload-section .upload-hint {
    font-size: 0.8rem;
    color: rgba(152, 251, 152, 0.5);
    margin-top: 8px;
}

/* ── Footer ── */
.site-footer {
    text-align: center;
    padding: 20px 40px;
    border-top: 2px solid #98FB98;
    font-size: 0.8rem;
    color: rgba(152, 251, 152, 0.5);
}

/* ── Splash Page ── */
.splash-content {
    margin-top: 10%;
    padding-bottom: 40px;
}

.splash-content h1 {
    border-bottom: 2px solid #98FB98;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.splash-content p {
    max-width: 600px;
    color: #98FB98;
    font-size: 1.2rem;
}

.splash-content a {
    font-size: 1rem;
    font-weight: bold;
}

/* ── Cursor blink effect ── */
.cursor-blink::after {
    content: '_';
    animation: blink 1s step-end infinite;
    color: #98FB98;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ── Scanline overlay (subtle CRT effect) ── */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    z-index: 9999;
}

/* ── Selection ── */
::selection {
    background: #98FB98;
    color: #004010;
}

/* ── Scrollbar (Webkit) ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #002a0a;
}

::-webkit-scrollbar-thumb {
    background: #98FB98;
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
    }

    .login-inline {
        width: 100%;
    }

    .login-inline input[type="text"],
    .login-inline input[type="password"] {
        flex: 1;
        min-width: 0;
    }

    .content-wrapper {
        padding: 25px 20px;
    }

    .splash-content {
        margin-top: 5%;
    }

    h1 {
        font-size: 1.8rem;
    }

    .file-table {
        font-size: 0.85rem;
    }

    .file-table th,
    .file-table td {
        padding: 8px 6px;
    }
}

@media (max-width: 480px) {
    .login-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .login-inline input[type="text"],
    .login-inline input[type="password"] {
        width: 100%;
    }

    .site-header .logo-area img {
        max-width: 150px;
    }

    h1 {
        font-size: 1.5rem;
    }
}
