* {
    box-sizing: border-box;
}

:root {
    --orange: #ff5a1f;
    --orange-dark: #e64c13;
    --orange-light: #fff2eb;

    --dark: #20242d;
    --text: #292d35;
    --muted: #6b7280;

    --background: #f5f6f8;
    --white: #ffffff;

    --border: #e5e7eb;

    --danger: #b91c1c;
    --danger-background: #fff1f2;
    --danger-border: #fecaca;
}


html,
body {
    margin: 0;
    min-height: 100%;
}


body {
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    color: var(--text);
}


/* =========================================================
   LOGIN
   ========================================================= */

.login-body {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    background:
        radial-gradient(
            circle at center,
            rgba(255, 90, 31, 0.10),
            transparent 35%
        ),
        #ffffff;
}


.login-page {
    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 35px 20px;
}


.login-container {
    width: 100%;
    max-width: 430px;
}


.brand-section {
    text-align: center;
    margin-bottom: 28px;
}


.brand-logo {
    width: 62px;
    height: 62px;

    margin: 0 auto 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;

    background: var(--orange);

    color: white;

    font-size: 30px;
    font-weight: 800;

    box-shadow:
        0 10px 25px
        rgba(255, 90, 31, 0.22);
}


.brand-title {
    margin: 0;

    font-size: 36px;
    font-weight: 800;

    color: var(--dark);
}


.brand-title span {
    color: var(--orange);
}


.brand-subtitle {
    margin: 8px 0 0;

    color: var(--muted);

    font-size: 15px;
}


.login-card {
    padding: 28px;

    border-radius: 16px;

    background:
        rgba(255, 255, 255, 0.96);

    box-shadow:
        0 20px 50px
        rgba(31, 41, 55, 0.08);
}


.form-group {
    margin-bottom: 19px;
}


.form-group label,
.field label {
    display: block;

    margin-bottom: 7px;

    color: #374151;

    font-size: 14px;
    font-weight: 600;
}


.input-wrapper {
    position: relative;
}


.input-icon {
    position: absolute;

    left: 13px;
    top: 50%;

    transform: translateY(-50%);

    z-index: 2;
}


.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    height: 48px;

    padding:
        0 45px;

    border:
        1px solid #aaa98c;

    border-radius: 6px;

    background:
        linear-gradient(
            90deg,
            #fffbd6,
            #fffedb
        );

    font-size: 15px;
}


input:focus {
    outline: none;

    border-color:
        var(--orange) !important;

    box-shadow:
        0 0 0 3px
        rgba(255, 90, 31, 0.10);
}


.password-toggle {
    position: absolute;

    right: 12px;
    top: 50%;

    transform: translateY(-50%);

    border: 0;
    background: transparent;

    cursor: pointer;

    font-size: 17px;
}


.login-options {
    margin-bottom: 24px;
}


.remember-option {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    cursor: pointer;

    font-size: 14px;
    font-weight: 600;
}


.remember-option input {
    width: 15px;
    height: 15px;

    margin: 0;
}


.primary-button {
    height: 44px;

    padding:
        0 24px;

    border: 0;

    border-radius: 6px;

    background:
        var(--orange);

    color: white;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.15s ease;
}


.primary-button:hover {
    background:
        var(--orange-dark);

    transform:
        translateY(-1px);
}


.login-button {
    width: 100%;
    height: 50px;

    font-size: 17px;
}


.alert {
    padding:
        12px 14px;

    border-radius: 7px;
}


.alert-error {
    border:
        1px solid
        var(--danger-border);

    background:
        var(--danger-background);

    color:
        var(--danger);
}


.login-card .alert {
    margin-bottom: 20px;
}


.login-footer-text {
    margin-top: 28px;

    text-align: center;

    color: #444;

    font-size: 14px;
}


.login-footer-text strong {
    color:
        var(--orange);
}


.login-footer-text span {
    margin:
        0 4px;
}


.page-footer {
    padding: 20px;

    text-align: center;

    font-size: 14px;
}


.page-footer span {
    color:
        var(--orange);

    font-weight: 600;
}


/* =========================================================
   PORTAL
   ========================================================= */

.portal-body {
    min-height: 100vh;

    background:
        var(--background);
}


.topbar {
    min-height: 70px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding:
        12px 24px;

    border-bottom:
        1px solid
        #ececec;

    background: white;

    box-shadow:
        0 2px 10px
        rgba(0, 0, 0, 0.03);
}


.brand-area {
    display: flex;
    align-items: center;

    gap: 11px;
}


.small-logo {
    width: 42px;
    height: 42px;

    margin: 0;

    font-size: 21px;

    box-shadow: none;
}


.portal-brand {
    color:
        var(--dark);

    font-size: 21px;
    font-weight: 800;
}


.portal-brand span {
    color:
        var(--orange);
}


.user-area {
    display: flex;
    align-items: center;

    gap: 12px;
}


.user-badge {
    padding:
        8px 12px;

    border-radius: 20px;

    background:
        var(--orange-light);

    color:
        var(--orange-dark);

    font-size: 14px;
    font-weight: 600;
}


.logout-button {
    padding:
        8px 14px;

    border-radius: 6px;

    background:
        var(--orange);

    color: white;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;
}


.logout-button:hover {
    background:
        var(--orange-dark);
}


.portal-wrapper {
    width: 100%;
    max-width: 1300px;

    margin:
        30px auto;

    padding:
        0 18px;
}


.portal-heading {
    margin-bottom: 22px;
}


.portal-heading h1 {
    margin:
        0 0 6px;

    color:
        var(--dark);

    font-size: 30px;
}


.portal-heading p {
    margin: 0;

    color:
        var(--muted);
}


.portal-card {
    padding: 24px;

    border:
        1px solid
        #ececec;

    border-radius: 12px;

    background: white;

    box-shadow:
        0 4px 18px
        rgba(0, 0, 0, 0.05);
}


.recording-tabs {
    display: flex;

    gap: 10px;

    margin-bottom: 24px;
}


.recording-tab {
    padding:
        11px 20px;

    border:
        1px solid
        #ddd;

    border-radius: 6px;

    background:
        #fafafa;

    color:
        var(--dark);

    text-decoration: none;

    font-weight: 600;
}


.recording-tab.active {
    border-color:
        var(--orange);

    background:
        var(--orange);

    color: white;
}


.search-grid {
    display: grid;

    grid-template-columns:
        1fr
        1fr
        1fr
        2fr
        auto;

    gap: 14px;

    align-items: end;
}


.field input {
    width: 100%;
    height: 44px;

    padding:
        0 12px;

    border:
        1px solid
        #d6d6d6;

    border-radius: 6px;

    font-size: 15px;
}


.optional {
    color:
        var(--muted);

    font-weight: 400;
}


.search-action {
    display: flex;
}


.search-action .primary-button {
    width: 100%;
}


.help-box {
    margin-top: 20px;

    padding:
        14px 16px;

    border-left:
        4px solid
        var(--orange);

    border-radius: 6px;

    background:
        #fff7f2;

    color:
        #5b463d;

    font-size: 14px;

    line-height: 1.6;
}


.result-alert {
    margin-top: 20px;
}


.results-section {
    margin-top: 30px;
}


.results-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 14px;
}


.results-heading h2 {
    margin:
        0 0 4px;

    font-size: 21px;
}


.results-heading p {
    margin: 0;

    color:
        var(--muted);

    font-size: 14px;
}


.result-count {
    padding:
        7px 11px;

    border-radius: 20px;

    background:
        var(--orange-light);

    color:
        var(--orange-dark);

    white-space: nowrap;

    font-size: 13px;
    font-weight: 600;
}


.searched-path {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 15px;

    padding:
        11px 14px;

    border-radius: 6px;

    background:
        #f4f4f5;

    font-size: 13px;
}


.searched-path span {
    font-weight: 600;
}


.searched-path code {
    word-break:
        break-word;
}


.table-container {
    overflow-x: auto;
}


.recordings-table {
    width: 100%;

    min-width: 900px;

    border-collapse: collapse;
}


.recordings-table th {
    padding:
        13px;

    border-bottom:
        2px solid
        #ececec;

    background:
        #fafafa;

    color:
        #4b5563;

    text-align: left;

    white-space: nowrap;

    font-size: 14px;
}


.recordings-table td {
    padding:
        14px 13px;

    border-bottom:
        1px solid
        #ececec;

    vertical-align: middle;

    font-size: 14px;
}


.recordings-table tbody tr:hover td {
    background:
        #fffaf7;
}


.filename-cell {
    max-width: 600px;

    word-break:
        break-word;
}


.timestamp-cell {
    white-space: nowrap;

    color:
        #374151;

    font-family:
        monospace;

    font-size: 13px !important;
}


.size-cell {
    white-space: nowrap;
}


.download-button {
    display: inline-block;

    padding:
        7px 12px;

    border-radius: 5px;

    background:
        var(--orange);

    color: white;

    text-decoration: none;

    font-size: 13px;
    font-weight: 600;
}


.download-button:hover {
    background:
        var(--orange-dark);
}


.no-results {
    padding:
        28px !important;

    color:
        var(--muted);

    text-align: center;
}


.portal-footer {
    padding:
        5px 20px 30px;

    color:
        var(--muted);

    text-align: center;

    font-size: 13px;
}


.portal-footer span {
    margin:
        0 5px;

    color:
        var(--orange);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 950px) {

    .search-grid {
        grid-template-columns:
            1fr 1fr;
    }

}


@media (max-width: 600px) {

    .login-page {
        padding:
            25px 16px;
    }


    .brand-title {
        font-size: 29px;
    }


    .login-card {
        padding: 22px;
    }


    .topbar {
        padding:
            12px 15px;
    }


    .portal-brand {
        font-size: 17px;
    }


    .user-badge {
        display: none;
    }


    .portal-wrapper {
        margin:
            18px auto;

        padding:
            0 12px;
    }


    .portal-heading h1 {
        font-size: 24px;
    }


    .portal-card {
        padding: 17px;
    }


    .recording-tabs {
        display: grid;

        grid-template-columns:
            1fr 1fr;
    }


    .recording-tab {
        text-align: center;
    }


    .search-grid {
        grid-template-columns:
            1fr;
    }


    .results-heading {
        align-items:
            flex-start;

        flex-direction:
            column;
    }


    .searched-path {
        align-items:
            flex-start;

        flex-direction:
            column;
    }

}
