:root {
    --bg: #f6f8fc;
    --surface: #ffffff;
    --text: #172033;
    --muted: #667085;
    --primary: #5b5ce2;
    --primary-dark: #4748c7;
    --border: #e7eaf0;
    --success: #12b76a;
    --shadow: 0 12px 35px rgba(16, 24, 40, 0.08);
    --radius: 18px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin: auto;
}

/* Navbar */

.navbar {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 21px;
    font-weight: 800;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-size: 20px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: var(--muted);
    font-weight: 600;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    border-color: var(--border);
}

/* Hero */

.hero {
    padding: 90px 0 110px;
    text-align: center;
}

.badge {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eeefff;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero h1 {
    max-width: 760px;
    margin: auto;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -2.5px;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    max-width: 650px;
    margin: 24px auto 32px;
    color: var(--muted);
    font-size: 18px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Features */

.features {
    padding: 30px 0 90px;
}

.section-heading {
    text-align: center;
    margin-bottom: 35px;
}

.section-heading h2 {
    font-size: 34px;
    margin-bottom: 10px;
}

.section-heading p {
    color: var(--muted);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.feature-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #eeefff;
    margin-bottom: 20px;
    font-size: 21px;
}

.feature-card h3 {
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--muted);
}

/* Footer */

.footer {
    border-top: 1px solid var(--border);
    padding: 28px 0;
    color: var(--muted);
    font-size: 14px;
}

/* Mobile */

@media (max-width: 760px) {
    .container {
        width: min(100% - 28px, 600px);
    }

    .navbar {
        height: 68px;
    }

    .nav-links {
        gap: 10px;
    }

    .nav-links .desktop-link {
        display: none;
    }

    .hero {
        padding: 65px 0 75px;
    }

    .hero h1 {
        letter-spacing: -1.5px;
    }

    .hero p {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}
/* Authentication */

.auth-section {
    min-height: calc(100vh - 144px);
    display: grid;
    place-items: center;
    padding: 50px 0;
}

.auth-card {
    width: min(100%, 480px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 36px;
    box-shadow: var(--shadow);
}

.auth-heading {
    text-align: center;
    margin-bottom: 28px;
}

.auth-heading h1 {
    font-size: 32px;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.auth-heading p {
    color: var(--muted);
}

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

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 7px;
}

.form-group input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    outline: none;
    transition: 0.2s ease;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(91, 92, 226, 0.1);
}

.form-group small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 5px;
}

.btn-full {
    width: 100%;
    border: 0;
    font-size: 15px;
}

.alert {
    border-radius: 12px;
    padding: 13px 15px;
    margin-bottom: 20px;
    font-size: 14px;
    transition: opacity 0.35s ease, transform 0.35s ease, max-height 0.35s ease, margin 0.35s ease, padding 0.35s ease;
    overflow: hidden;
}

.alert.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
    max-height: 0 !important;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.alert-error {
    background: #fff1f0;
    border: 1px solid #ffd5d2;
    color: #b42318;
}

.alert-success {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #067647;
}

.auth-footer {
    text-align: center;
    color: var(--muted);
    margin-top: 22px;
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 700;
}

@media (max-width: 520px) {
    .auth-card {
        padding: 25px 20px;
        border-radius: 18px;
    }

    .auth-heading h1 {
        font-size: 27px;
    }
}
.nav-links .btn-primary {
    color: #ffffff;
}

/* Clean login refinements */

.nav-signup {
    white-space: nowrap;
    min-width: 92px;
}

.login-card {
    max-width: 430px;
}

.login-card .auth-heading {
    margin-bottom: 30px;
}

.login-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: #eeefff;
    font-size: 23px;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 52px;
}

.password-toggle {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
}

.password-toggle:hover {
    background: #f2f4f7;
}

.login-button {
    min-height: 49px;
    margin-top: 4px;
}

.forgot-link {
    display: block;
    width: fit-content;
    margin: 14px auto 0;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.auth-footer {
    margin-top: 25px;
}

@media (max-width: 520px) {

    .nav-signup {
        min-width: 80px;
        padding: 0 14px;
    }

    .login-card {
        padding: 28px 20px;
    }

}

/* Clean signup */

.signup-card {
    max-width: 430px;
}

.signup-card .auth-heading {
    margin-bottom: 27px;
}

.signup-card .form-group {
    margin-bottom: 16px;
}

.signup-card .login-button {
    margin-top: 5px;
}

@media (max-width: 520px) {

    .signup-card {
        padding: 26px 20px;
    }

}


/* Dashboard */

.dashboard-section {
    padding: 50px 0 70px;
}

.dashboard-container {
    max-width: 1050px;
}

.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-eyebrow {
    margin: 0 0 5px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.dashboard-heading h1 {
    margin: 0;
    font-size: 30px;
}

.dashboard-heading p:not(.dashboard-eyebrow) {
    margin: 7px 0 0;
    color: #667085;
}

.dashboard-upload {
    white-space: nowrap;
}

.dashboard-user {
    color: #667085;
    font-size: 14px;
    font-weight: 600;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #eaecf0;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 4px 18px rgba(16, 24, 40, 0.04);
}

.dashboard-card-label {
    display: block;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.dashboard-card h2 {
    margin: 0;
    font-size: 22px;
}

.dashboard-card h2 span {
    color: #98a2b3;
    font-size: 14px;
    font-weight: 500;
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.storage-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: #eeefff;
    font-size: 21px;
}

.storage-bar {
    height: 9px;
    margin-top: 22px;
    overflow: hidden;
    border-radius: 20px;
    background: #eef0f3;
}

.storage-progress {
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}

.storage-info {
    margin: 10px 0 0;
    color: #667085;
    font-size: 13px;
}

.account-card p {
    margin: 7px 0 14px;
    color: #667085;
    font-size: 14px;
    word-break: break-word;
}

.account-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    background: #ecfdf3;
    color: #027a48;
    font-size: 12px;
    font-weight: 700;
}

.files-card {
    min-height: 330px;
}

.files-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eaecf0;
}

.files-header h2 {
    font-size: 20px;
}

.files-count {
    color: #667085;
    font-size: 13px;
    font-weight: 600;
}

.empty-files {
    min-height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.empty-files-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin-bottom: 13px;
    border-radius: 15px;
    background: #f2f4f7;
    font-size: 22px;
}

.empty-files h3 {
    margin: 0;
    font-size: 17px;
}

.empty-files p {
    margin: 7px 0 17px;
    color: #667085;
    font-size: 13px;
}

@media (max-width: 700px) {

    .dashboard-section {
        padding: 30px 0 50px;
    }

    .dashboard-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-heading h1 {
        font-size: 25px;
    }

    .dashboard-upload {
        width: 100%;
    }

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

    .dashboard-user {
        display: none;
    }

}


/* File upload */

.upload-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-form .dashboard-upload {
    border: 0;
    cursor: pointer;
}

.upload-message {
    margin-bottom: 18px;
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.upload-success {
    background: #ecfdf3;
    color: #027a48;
    border: 1px solid #abefc6;
}

.upload-error {
    background: #fef3f2;
    color: #b42318;
    border: 1px solid #fecdca;
}

.file-list {
    padding-top: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 4px;
    border-bottom: 1px solid #eaecf0;
}

.file-item:last-child {
    border-bottom: 0;
}

.file-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #f2f4f7;
    flex-shrink: 0;
}

.file-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-details strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.file-details span {
    color: #667085;
    font-size: 12px;
}

@media (max-width: 700px) {

    .upload-form {
        width: 100%;
    }

    .upload-form .dashboard-upload {
        flex: 1;
        text-align: center;
    }

}


/* Selected file preview */

.selected-files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.selected-file {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 11px;
    background: #ffffff;
    border: 1px solid #eaecf0;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(16, 24, 40, 0.04);
}

.selected-file-preview {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: #f2f4f7;
    font-size: 22px;
}

.selected-file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.selected-file-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.selected-file-details strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.selected-file-details span {
    color: #667085;
    font-size: 12px;
}

.upload-form .dashboard-upload:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 700px) {

    .selected-files {
        grid-template-columns: 1fr;
    }

}


/* Uploaded file thumbnails */

.file-thumbnail {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    overflow: hidden;
    border-radius: 11px;
    background: #f2f4f7;
}

.file-thumbnail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}


/* File actions */

.file-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.file-details {
    flex: 1;
}

.file-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.file-actions form {
    margin: 0;
}

.file-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 11px;
    border-radius: 8px;
    border: 1px solid #d0d5dd;
    background: #ffffff;
    color: #344054;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.file-action:hover {
    background: #f9fafb;
}

.delete-action {
    color: #b42318;
    border-color: #fecdca;
}

.delete-action:hover {
    background: #fef3f2;
}

@media (max-width: 600px) {

    .file-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .file-details {
        min-width: calc(100% - 70px);
    }

    .file-actions {
        width: 100%;
        margin-left: 66px;
    }

    .file-action {
        flex: 1;
    }

}


/* MyCloud Media Manager */

.media-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 22px;
    overflow-x: auto;
    padding-bottom: 3px;
}

.media-tabs a {
    white-space: nowrap;
    padding: 9px 15px;
    border-radius: 10px;
    color: #667085;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.media-tabs a:hover {
    background: #f2f4f7;
    color: #344054;
}

.media-tabs a.active {
    background: #eeefff;
    color: var(--primary);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
}

.media-card {
    display: block;
    overflow: hidden;
    border: 1px solid #eaecf0;
    border-radius: 16px;
    background: #ffffff;
    text-decoration: none;
    color: inherit;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease;
}

.media-card:hover {
    transform: translateY(-3px);
    border-color: #d0d5dd;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .10);
}

.media-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f9fc;
}

.media-thumbnail img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .25s ease;
}

.media-card:hover .media-thumbnail img {
    transform: scale(1.035);
}

.video-placeholder,
.file-placeholder {
    display: grid;
    place-items: center;
    color: #667085;
}

.video-placeholder::before,
.file-placeholder::before {
    content: "";
    position: absolute;
    width: 76px;
    height: 76px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(16, 24, 40, .08);
}

.video-placeholder svg,
.file-placeholder svg {
    position: relative;
    z-index: 1;
}

.video-placeholder {
    color: var(--primary);
}

.file-placeholder {
    color: #475467;
}

.media-info {
    min-width: 0;
    padding: 13px 13px 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: #ffffff;
}

.media-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    line-height: 1.4;
    color: #101828;
}

.media-info span {
    color: #667085;
    font-size: 12px;
    line-height: 1.3;
}

@media (max-width: 520px) {

    .media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

}


/* File Viewer */

.viewer-section {
    padding: 35px 0 60px;
}

.viewer-container {
    max-width: 1000px;
}

.viewer-top {
    margin-bottom: 18px;
}

.viewer-back {
    color: #475467;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.viewer-back:hover {
    color: var(--primary);
}

.viewer-card {
    overflow: hidden;
    border: 1px solid #eaecf0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(16, 24, 40, .06);
}

.viewer-preview {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f4f7;
}

.viewer-image {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.viewer-video {
    display: block;
    width: 100%;
    max-height: 70vh;
    background: #000;
}

.viewer-file-icon {
    width: 110px;
    height: 110px;
    display: grid;
    place-items: center;
    border-radius: 25px;
    background: #ffffff;
    font-size: 55px;
}

.viewer-info {
    padding: 24px;
}

.viewer-info h1 {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 21px;
}

.viewer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
}

.viewer-meta span {
    padding: 5px 9px;
    border-radius: 7px;
    background: #f2f4f7;
    color: #667085;
    font-size: 12px;
}

.viewer-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
}

.viewer-actions form {
    margin: 0;
}

.viewer-delete {
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #fecdca;
    border-radius: 9px;
    background: #ffffff;
    color: #b42318;
    font-weight: 700;
    cursor: pointer;
}

.viewer-delete:hover {
    background: #fef3f2;
}

@media (max-width: 600px) {

    .viewer-section {
        padding-top: 20px;
    }

    .viewer-preview {
        min-height: 240px;
    }

    .viewer-info {
        padding: 18px;
    }

    .viewer-info h1 {
        font-size: 18px;
    }

    .viewer-info h1 {
        display: none;
    }

    .viewer-actions {
        width: 100%;
        align-items: stretch;
        gap: 8px;
    }

    .viewer-actions > a,
    .viewer-actions > form {
        flex: 1 1 0;
        min-width: 0;
    }

    .viewer-actions .btn,
    .viewer-delete {
        width: 100%;
        min-height: 42px;
        height: 42px;
        box-sizing: border-box;
        padding: 0 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
    }

    .viewer-actions form {
        display: flex;
    }

}


/* Viewer navigation */

.viewer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.viewer-counter {
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.viewer-preview-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f2f4f7;
    overflow: hidden;
    touch-action: auto;
}

.viewer-nav {
    position: absolute;
    z-index: 5;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    color: #344054;
    text-decoration: none;
    font-size: 38px;
    line-height: 1;
    box-shadow: 0 4px 15px rgba(16,24,40,.15);
    transition: transform .15s ease, background .15s ease;
}

.viewer-nav:hover {
    background: #ffffff;
}

.viewer-prev {
    left: 16px;
}

.viewer-next {
    right: 16px;
}

@media (max-width: 600px) {

    .viewer-nav {
        width: 40px;
        height: 40px;
        font-size: 32px;
    }

    .viewer-prev {
        left: 9px;
    }

    .viewer-next {
        right: 9px;
    }

}


/* =========================================================
   Professional Media Viewer
   ========================================================= */

.viewer-section {
    min-height: calc(100vh - 140px);
    padding: 18px 0 30px;
    background: #0b0d10;
}

.viewer-container {
    max-width: 1200px;
}

.viewer-top {
    padding: 0 4px 14px;
}

.viewer-back {
    color: #d0d5dd;
}

.viewer-back:hover {
    color: #ffffff;
}

.viewer-counter {
    color: #98a2b3;
}

.viewer-card {
    overflow: hidden;
    border: 1px solid #252a31;
    border-radius: 16px;
    background: #111418;
    box-shadow: 0 12px 40px rgba(0,0,0,.35);
}

.viewer-preview-area {
    min-height: min(72vh, 720px);
    background: #080a0d;
}

.viewer-preview {
    min-height: min(72vh, 720px);
    width: 100%;
    padding: 28px 75px;
    box-sizing: border-box;
    background: #080a0d;
}

.viewer-image {
    max-width: 100%;
    max-height: min(68vh, 680px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 35px rgba(0,0,0,.35);
}

.viewer-video {
    max-width: 100%;
    max-height: min(68vh, 680px);
    border-radius: 6px;
    background: #000;
    box-shadow: 0 10px 35px rgba(0,0,0,.35);
}

.viewer-file-icon {
    width: 120px;
    height: 120px;
    border-radius: 28px;
    background: #1d2229;
    color: #ffffff;
    font-size: 58px;
}

.viewer-nav {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.10);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 5px 20px rgba(0,0,0,.35);
    backdrop-filter: blur(8px);
}

.viewer-nav:hover {
    background: rgba(255,255,255,.18);
    color: #ffffff;
}

.viewer-info {
    padding: 18px 22px;
    border-top: 1px solid #252a31;
    background: #111418;
}

.viewer-info h1 {
    color: #f2f4f7;
    font-size: 17px;
}

.viewer-meta span {
    background: #1d2229;
    color: #98a2b3;
}

.viewer-actions {
    margin-top: 16px;
}

.viewer-delete {
    border-color: #54212a;
    background: #111418;
    color: #f97066;
}

.viewer-delete:hover {
    background: #2a1519;
}

@media (max-width: 600px) {

    .viewer-section {
        min-height: calc(100vh - 120px);
        padding: 10px 0 20px;
    }

    .viewer-card {
        border-radius: 12px;
    }

    .viewer-preview-area,
    .viewer-preview {
        min-height: 58vh;
    }

    .viewer-preview {
        padding: 18px 48px;
    }

    .viewer-image {
        max-height: 55vh;
    }

    .viewer-video {
        max-height: 55vh;
    }

    .viewer-info {
        padding: 16px;
    }

    .viewer-info h1 {
        font-size: 16px;
    }

}

/* =========================================================
   Full Screen Media Viewer
   ========================================================= */

body:has(.viewer-section) {
    background: #080a0d;
}

body:has(.viewer-section) header,
body:has(.viewer-section) footer {
    display: none;
}

body:has(.viewer-section) .viewer-section {
    min-height: 100vh;
    height: 100vh;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

body:has(.viewer-section) .viewer-container {
    width: 100%;
    max-width: none;
    height: 100vh;
    padding: 0;
}

body:has(.viewer-section) .viewer-top {
    position: fixed;
    z-index: 20;
    top: 0;
    left: 0;
    right: 0;
    height: 58px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.75),
        rgba(0,0,0,0)
    );
    pointer-events: none;
}

body:has(.viewer-section) .viewer-top > * {
    pointer-events: auto;
}

body:has(.viewer-section) .viewer-card {
    width: 100%;
    height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #080a0d;
}

body:has(.viewer-section) .viewer-preview-area {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    background: #080a0d;
}

body:has(.viewer-section) .viewer-preview {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    padding: 70px 65px 90px;
    background: #080a0d;
    box-sizing: border-box;
}

body:has(.viewer-section) .viewer-image {
    max-width: 100%;
    max-height: calc(100vh - 150px);
    object-fit: contain;
    box-shadow: none;
    border-radius: 0;
}

body:has(.viewer-section) .viewer-video {
    width: 100%;
    max-width: 1200px;
    max-height: calc(100vh - 150px);
    object-fit: contain;
    border-radius: 4px;
    box-shadow: none;
}

body:has(.viewer-section) .viewer-info {
    position: fixed;
    z-index: 20;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.82),
        rgba(0,0,0,0)
    );
    border: 0;
    pointer-events: none;
}

body:has(.viewer-section) .viewer-info h1 {
    display: none;
}

@media (max-width: 600px) {

    body:has(.viewer-section) .viewer-info {
        display: block;
        padding: 14px 12px;
    }

    body:has(.viewer-section) .viewer-actions {
        width: 100%;
        display: flex;
        align-items: stretch;
        gap: 8px;
        margin: 0;
    }

    body:has(.viewer-section) .viewer-actions > a,
    body:has(.viewer-section) .viewer-actions > form {
        flex: 1 1 0;
        width: 0;
        min-width: 0;
        margin: 0;
    }

    body:has(.viewer-section) .viewer-actions .btn,
    body:has(.viewer-section) .viewer-actions .viewer-delete {
        width: 100%;
        height: 42px;
        min-height: 42px;
        padding: 0 6px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: nowrap;
    }

    body:has(.viewer-section) .viewer-actions form {
        display: flex;
    }

}

body:has(.viewer-section) .viewer-meta {
    display: none;
}

body:has(.viewer-section) .viewer-actions {
    margin: 0;
    pointer-events: auto;
}

body:has(.viewer-section) .viewer-nav {
    position: fixed;
    z-index: 25;
}

body:has(.viewer-section) .viewer-prev {
    left: 18px;
}

body:has(.viewer-section) .viewer-next {
    right: 18px;
}

@media (max-width: 600px) {

    body:has(.viewer-section) .viewer-top {
        height: 52px;
        padding: 0 14px;
    }

    body:has(.viewer-section) .viewer-preview {
        padding: 55px 35px 80px;
    }

    body:has(.viewer-section) .viewer-image {
        max-height: calc(100vh - 135px);
    }

    body:has(.viewer-section) .viewer-video {
        max-height: calc(100vh - 135px);
    }

    body:has(.viewer-section) .viewer-info {
        padding: 12px 14px;
    }

    body:has(.viewer-section) .viewer-info h1 {
        max-width: 48vw;
        font-size: 14px;
    }

    body:has(.viewer-section) .viewer-nav {
        width: 38px;
        height: 38px;
    }

    body:has(.viewer-section) .viewer-prev {
        left: 8px;
    }

    body:has(.viewer-section) .viewer-next {
        right: 8px;
    }

}

/* =========================================================
   Media Multi Select
   ========================================================= */

.media-select-wrap {
    position: relative;
    min-width: 0;
}

.media-select {
    position: absolute;
    z-index: 20;
    top: 11px;
    left: 11px;
    width: 21px;
    height: 21px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
    filter: drop-shadow(0 2px 4px rgba(16, 24, 40, .16));
}

.media-select-wrap:has(.media-select:checked) .media-card {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(91, 92, 226, .12);
}

.media-select-wrap:has(.media-select:checked) .media-thumbnail {
    background: #f5f5ff;
}

.media-select-wrap:has(.media-select:checked) .media-info {
    background: #fafaff;
}

.bulk-toolbar {
    position: sticky;
    z-index: 30;
    top: 10px;
    margin-bottom: 16px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 6px 20px rgba(16,24,40,.08);
    backdrop-filter: blur(10px);
}

.bulk-toolbar[hidden] {
    display: none;
}

#selectedCount {
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.bulk-download-button {
    min-height: 40px;
    white-space: nowrap;
}

@media (max-width: 520px) {

    .bulk-toolbar {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        top: auto;
        margin: 0;
        padding: 10px;
        border-radius: 14px;
        box-shadow: 0 10px 30px rgba(16,24,40,.16);
    }

    .bulk-download-button {
        min-height: 42px;
        padding: 0 14px;
    }

}


/* Dashboard Media Groups */

.media-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.media-group-card {
    min-height: 150px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #eaecf0;
    border-radius: 18px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(16, 24, 40, .04);
    transition: transform .15s ease, box-shadow .15s ease;
}

.media-group-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(16, 24, 40, .09);
}

.media-group-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: #f2f4f7;
    font-size: 30px;
}

.media-group-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.media-group-content strong {
    font-size: 17px;
}

.media-group-content span {
    color: #667085;
    font-size: 13px;
}

@media (max-width: 700px) {

    .media-groups {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .media-group-card {
        min-height: 120px;
        padding: 18px;
    }

}


/* Dashboard media groups - layout fix */

.dashboard-container .media-groups {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100%;
    margin: 24px 0;
    gap: 16px;
}

.dashboard-container .media-group-card {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 150px;
    box-sizing: border-box;
}

@media (max-width: 700px) {

    .dashboard-container .media-groups {
        grid-template-columns: 1fr !important;
    }

}

/* Keep media groups horizontal on mobile */

@media (max-width: 700px) {

    .dashboard-container .media-groups {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px;
    }

    .dashboard-container .media-group-card {
        min-height: 105px;
        padding: 12px 8px;
        align-items: center;
        text-align: center;
        gap: 8px;
        border-radius: 14px;
    }

    .dashboard-container .media-group-icon {
        width: 42px;
        height: 42px;
        border-radius: 11px;
        font-size: 21px;
    }

    .dashboard-container .media-group-content {
        align-items: center;
        gap: 2px;
    }

    .dashboard-container .media-group-content strong {
        font-size: 12px;
    }

    .dashboard-container .media-group-content span {
        display: none;
    }

}

/* Logout confirmation modal */

body.logout-modal-open {
    overflow: hidden;
}

.logout-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
}

.logout-modal.is-visible {
    opacity: 1;
    visibility: visible;
}

.logout-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, .48);
    backdrop-filter: blur(6px);
}

.logout-modal-card {
    position: relative;
    width: min(100%, 410px);
    padding: 26px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(16, 24, 40, .22);
    transform: translateY(10px) scale(.98);
    transition: transform .18s ease;
}

.logout-modal.is-visible .logout-modal-card {
    transform: translateY(0) scale(1);
}

.logout-modal-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 14px;
    background: #f2f4f7;
    color: #344054;
}

.logout-modal-content h2 {
    margin: 0;
    font-size: 21px;
    color: #101828;
}

.logout-modal-content p {
    margin: 8px 0 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.55;
}

.logout-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.logout-modal-actions button,
.logout-modal-actions a {
    flex: 1;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.logout-modal-cancel {
    border: 1px solid #d0d5dd;
    background: #ffffff;
    color: #344054;
}

.logout-modal-confirm {
    border: 1px solid #d92d20;
    background: #d92d20;
    color: #ffffff;
}

.logout-modal-cancel:hover {
    background: #f9fafb;
}

.logout-modal-confirm:hover {
    background: #b42318;
}

@media (max-width: 480px) {

    .logout-modal {
        padding: 16px;
    }

    .logout-modal-card {
        padding: 22px;
        border-radius: 18px;
    }

    .logout-modal-actions {
        flex-direction: column-reverse;
    }

}

/* Media page category tabs hidden.
   Dashboard media groups are the primary navigation. */

.media-tabs {
    display: none !important;
}

/* =========================================================
   MyCloud Dashboard UI/UX Polish — Patch 1
   Header + Storage + Account
   UI-only overrides — functionality unchanged
   ========================================================= */

.dashboard-section {
    padding-top: 44px;
}

.dashboard-heading {
    margin-bottom: 32px;
}

.dashboard-heading h1 {
    font-size: 32px;
    line-height: 1.2;
    letter-spacing: -0.7px;
}

.dashboard-heading p:not(.dashboard-eyebrow) {
    max-width: 620px;
    line-height: 1.55;
}

.dashboard-eyebrow {
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.dashboard-upload {
    min-height: 44px;
    padding-left: 18px;
    padding-right: 18px;
    border-radius: 11px;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(91, 92, 226, 0.12);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        opacity 0.18s ease;
}

.dashboard-upload:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(91, 92, 226, 0.16);
}

.dashboard-card {
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 5px 20px rgba(16, 24, 40, 0.045);
    transition:
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

.dashboard-card:hover {
    border-color: #dfe2e8;
    box-shadow: 0 7px 24px rgba(16, 24, 40, 0.06);
}

.dashboard-card-label {
    letter-spacing: 0.1px;
}

.dashboard-card h2 {
    line-height: 1.3;
    letter-spacing: -0.25px;
}

.storage-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
}

.storage-bar {
    height: 10px;
    margin-top: 20px;
    background: #eef0f3;
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.05);
}

.storage-progress {
    min-width: 2px;
    transition: width 0.35s ease;
}

.storage-info {
    margin-top: 11px;
    line-height: 1.5;
}

.account-card p {
    margin-top: 9px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.account-status {
    padding: 6px 11px;
    line-height: 1.2;
    letter-spacing: 0.1px;
}

@media (max-width: 700px) {

    .dashboard-section {
        padding-top: 28px;
    }

    .dashboard-heading {
        gap: 16px;
        margin-bottom: 24px;
    }

    .dashboard-heading h1 {
        font-size: 26px;
        letter-spacing: -0.45px;
    }

    .dashboard-heading p:not(.dashboard-eyebrow) {
        line-height: 1.5;
    }

    .dashboard-upload {
        min-height: 46px;
        border-radius: 12px;
    }

    .dashboard-card {
        padding: 21px;
        border-radius: 18px;
    }

    .dashboard-card-header {
        gap: 12px;
    }

    .storage-icon {
        width: 44px;
        height: 44px;
    }

}

@media (max-width: 420px) {

    .dashboard-card {
        padding: 18px;
    }

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

    .dashboard-upload {
        width: 100%;
    }

}


/* =========================================================
   Dashboard UI/UX — Patch 2
   Files, Upload & File Actions
   CSS-only override — functionality untouched
   ========================================================= */

.dashboard-container .upload-message {
    border-radius: 14px;
    padding: 13px 16px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.dashboard-container .upload-success {
    box-shadow: 0 3px 12px rgba(16, 24, 40, 0.04);
}

.dashboard-container .upload-error {
    box-shadow: 0 3px 12px rgba(16, 24, 40, 0.04);
}

/* File list */

.dashboard-container .file-list {
    padding-top: 4px;
}

.dashboard-container .file-item {
    position: relative;
    padding: 14px 4px;
    gap: 13px;
    transition: background-color 0.2s ease;
}

.dashboard-container .file-item:hover {
    background: #f9fafb;
    border-radius: 12px;
}

.dashboard-container .file-thumbnail,
.dashboard-container .file-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 12px;
}

.dashboard-container .file-icon {
    font-size: 20px;
}

.dashboard-container .file-details {
    gap: 5px;
    min-width: 0;
}

.dashboard-container .file-details strong {
    font-size: 13px;
    line-height: 1.4;
}

.dashboard-container .file-details span {
    font-size: 11px;
    line-height: 1.4;
}

.dashboard-container .file-actions {
    gap: 6px;
}

.dashboard-container .file-action {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 12px;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}

.dashboard-container .file-action:hover {
    transform: translateY(-1px);
}

.dashboard-container .delete-action:hover {
    transform: translateY(-1px);
}

/* Selected files */

.dashboard-container .selected-files {
    gap: 10px;
    margin-bottom: 20px;
}

.dashboard-container .selected-file {
    padding: 10px;
    border-radius: 13px;
    box-shadow: 0 2px 10px rgba(16, 24, 40, 0.035);
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.dashboard-container .selected-file:hover {
    border-color: #d0d5dd;
    box-shadow: 0 4px 14px rgba(16, 24, 40, 0.06);
}

.dashboard-container .selected-file-preview {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    border-radius: 10px;
}

.dashboard-container .selected-file-details {
    gap: 3px;
}

.dashboard-container .selected-file-details strong {
    font-size: 12px;
    line-height: 1.4;
}

.dashboard-container .selected-file-details span {
    font-size: 11px;
}

/* Upload button state */

.dashboard-container .upload-form .dashboard-upload:disabled {
    opacity: 0.55;
    transform: none;
}

.dashboard-container .upload-form .dashboard-upload:disabled:hover {
    transform: none;
}

/* Mobile */

@media (max-width: 600px) {

    .dashboard-container .file-item {
        padding: 13px 2px;
        gap: 11px;
    }

    .dashboard-container .file-thumbnail,
    .dashboard-container .file-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .dashboard-container .file-details {
        min-width: 0;
    }

    .dashboard-container .file-actions {
        margin-left: 55px;
        gap: 7px;
    }

    .dashboard-container .file-action {
        min-height: 40px;
        padding: 0 10px;
    }

    .dashboard-container .selected-file {
        padding: 10px;
    }

}


/* =========================================================
   Dashboard UI Polish - Patch 3
   Notifications / Announcements / Warnings
   CSS-only override — functionality unchanged
   ========================================================= */

/* Upload result messages */

.dashboard-container .upload-message {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 13px 16px;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    box-shadow: 0 3px 12px rgba(16, 24, 40, 0.04);
}

.dashboard-container .upload-success {
    border-color: #abefc6;
}

.dashboard-container .upload-error {
    border-color: #fecdca;
}


/* User notification + global announcement */

.dashboard-container .user-notification-panel {
    position: relative;
    margin: 0 0 20px;
    padding: 20px 21px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(16, 24, 40, 0.045);
}

.dashboard-container .user-notification-header {
    gap: 11px;
    margin-bottom: 11px;
}

.dashboard-container .user-notification-header > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.75);
    font-size: 18px;
}

.dashboard-container .user-notification-header h2 {
    font-size: 17px;
    line-height: 1.35;
}

.dashboard-container .user-notification-message {
    margin: 0 0 14px;
    padding-left: 0;
    color: #344054;
    font-size: 14px;
    line-height: 1.6;
}

.dashboard-container .user-notification-actions {
    padding-left: 0;
    gap: 8px;
}

.dashboard-container .notification-action-button,
.dashboard-container .notification-dismiss-button {
    min-height: 38px;
    padding: 0 13px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
}

.dashboard-container .notification-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dashboard-container .notification-action-button:hover,
.dashboard-container .notification-dismiss-button:hover {
    transform: translateY(-1px);
}


/* Notification + Announcement final alignment */
.dashboard-container .user-notification-panel {
    text-align: left;
}

.dashboard-container .user-notification-header {
    justify-content: flex-start;
    text-align: left;
}

.dashboard-container .user-notification-message {
    display: block;
    width: 100%;
    margin: 0 0 14px;
    padding: 0;
    text-align: left;
}

.dashboard-container .user-notification-actions {
    display: flex;
    width: 100%;
    padding: 0;
    margin: 0;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
}

.dashboard-container .notification-action-button,
.dashboard-container .notification-dismiss-button {
    flex: 0 0 auto;
}

/* Account warning */

.dashboard-container .warning-panel {
    position: relative;
    margin: 0 0 24px;
    padding: 20px 21px;
    border: 1px solid #f4c76b;
    border-radius: 16px;
    background: #fffbeb;
    box-shadow: 0 4px 16px rgba(180, 83, 9, 0.06);
}

.dashboard-container .warning-panel-header {
    gap: 11px;
    margin-bottom: 13px;
}

.dashboard-container .warning-panel-header > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 11px;
    background: #fef3c7;
    font-size: 18px;
}

.dashboard-container .warning-panel-header h2 {
    font-size: 17px;
    line-height: 1.35;
    color: #92400e;
}

.dashboard-container .warning-item {
    padding-top: 2px;
}

.dashboard-container .warning-reason {
    margin: 0 0 8px;
    color: #451a03;
    font-size: 14px;
    line-height: 1.6;
}

.dashboard-container .warning-date {
    margin-bottom: 17px;
    color: #92400e;
    font-size: 12px;
    opacity: 0.72;
}

.dashboard-container .warning-actions {
    gap: 12px;
}

.dashboard-container .warning-actions .warning-timer {
    color: #92400e;
    font-size: 12px;
    line-height: 1.5;
}

.dashboard-container .warning-actions .btn {
    min-height: 40px;
    padding: 0 15px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-container .warning-error {
    margin-top: 11px;
    padding: 9px 11px;
    border-radius: 9px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 12px;
}


/* Mobile */

@media (max-width: 600px) {

    .dashboard-container .user-notification-panel,
    .dashboard-container .warning-panel {
        padding: 16px;
        border-radius: 14px;
    }

    .dashboard-container .user-notification-header,
    .dashboard-container .warning-panel-header {
        align-items: flex-start;
    }

    .dashboard-container .user-notification-message,
    .dashboard-container .user-notification-actions {
        padding-left: 0;
    }

    .dashboard-container .user-notification-message {
        margin-top: 4px;
        font-size: 13px;
        line-height: 1.6;
    }

    .dashboard-container .user-notification-actions {
        width: 100%;
    }

    .dashboard-container .notification-action-button,
    .dashboard-container .notification-dismiss-button {
        flex: 1;
        text-align: center;
    }

    .dashboard-container .warning-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-container .warning-actions .warning-timer {
        display: block;
    }

    .dashboard-container .warning-actions form,
    .dashboard-container .warning-actions .btn {
        width: 100%;
    }

    .dashboard-container .warning-actions .btn {
        min-height: 42px;
    }

}


/* =========================================================
   Notification Auto-Dismiss
   Applies to upload/media/viewer result notifications.
   ========================================================= */

.upload-message.notification-auto-dismiss {
    animation:
        notification-fade-in 0.25s ease-out,
        notification-fade-out 0.4s ease-in 3.6s forwards;
    will-change: opacity, transform, max-height, margin, padding;
}

@keyframes notification-fade-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes notification-fade-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-6px);
    }
}

/* Fullscreen viewer notifications must never participate
   in the fixed viewer-top layout. */
body:has(.viewer-section) .upload-message.notification-auto-dismiss {
    position: fixed;
    z-index: 50;
    top: 64px;
    left: 50%;
    transform: translateX(-50%);
    width: min(560px, calc(100% - 32px));
    margin: 0;
    box-sizing: border-box;
    pointer-events: none;
}

/* Keep the viewer notification animation compatible
   with its centered fixed position. */
body:has(.viewer-section) .upload-message.notification-auto-dismiss {
    animation:
        viewer-notification-fade-in 0.25s ease-out,
        viewer-notification-fade-out 0.4s ease-in 3.6s forwards;
}

@keyframes viewer-notification-fade-in {
    from {
        opacity: 0;
        transform: translate(-50%, -6px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes viewer-notification-fade-out {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    to {
        opacity: 0;
        transform: translate(-50%, -6px);
    }
}

@media (max-width: 600px) {

    body:has(.viewer-section) .upload-message.notification-auto-dismiss {
        top: 58px;
        width: calc(100% - 24px);
    }

}

/* Dashboard profile navigation */
.nav-profile {
    white-space: nowrap;
    min-width: 82px;
}

@media (max-width: 700px) {

    .nav-profile {
        min-width: 78px;
        padding-left: 14px;
        padding-right: 14px;
    }

}


/* Secure Share */

.share-modal[hidden] {
    display: none;
}

.share-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.share-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.share-modal-box {
    position: relative;
    z-index: 1;
    width: min(100%, 480px);
    max-height: 90vh;
    overflow-y: auto;
    padding: 22px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}

.share-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.share-modal-header h2 {
    margin: 0 0 5px;
    font-size: 21px;
}

.share-modal-header p {
    margin: 0;
    color: #667085;
    font-size: 13px;
}

.share-modal-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 9px;
    background: #f2f4f7;
    color: #344054;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.share-create-form .form-group {
    margin-bottom: 16px;
}

.share-create-form label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.share-create-form select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    background: #ffffff;
    font: inherit;
}

.share-download-option {
    display: flex !important;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    cursor: pointer;
}

.share-download-option input {
    width: 17px;
    height: 17px;
}

.share-message {
    padding: 11px 13px;
    margin-bottom: 16px;
    border-radius: 9px;
    font-size: 13px;
}

.share-error {
    background: #fef3f2;
    color: #b42318;
}

.share-success {
    background: #ecfdf3;
    color: #027a48;
}

.share-generated {
    margin-bottom: 20px;
}

.share-generated label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.share-link-row {
    display: flex;
    gap: 8px;
}

.share-link-row input {
    min-width: 0;
    flex: 1;
    padding: 0 11px;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    background: #f9fafb;
    font-size: 12px;
}

@media (max-width: 600px) {

    .share-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .share-modal-box {
        border-radius: 16px 16px 12px 12px;
        padding: 18px;
    }

    .share-link-row {
        flex-direction: column;
    }

    .share-link-row input {
        min-height: 42px;
    }

}


/* Secure Share Page */

.shared-page {
    min-height: 100vh;
    margin: 0;
    background: #f5f7fa;
}

.shared-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 18px;
}

.shared-card {
    overflow: hidden;
    border: 1px solid #eaecf0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(16, 24, 40, .08);
}

.shared-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    padding: 22px;
    border-bottom: 1px solid #eaecf0;
}

.shared-header h1 {
    margin: 0 0 6px;
    font-size: 22px;
}

.shared-header p {
    margin: 0;
    color: #667085;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.shared-badge {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #027a48;
    font-size: 12px;
    font-weight: 700;
}

.shared-preview {
    min-height: 300px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #101828;
    user-select: none;
    -webkit-user-select: none;
}

.shared-image {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.shared-video {
    display: block;
    width: 100%;
    max-height: 70vh;
}

.shared-file-icon {
    font-size: 70px;
}

.shared-file-name {
    max-width: 90%;
    margin: 15px 0 0;
    color: #ffffff;
    text-align: center;
    overflow-wrap: anywhere;
}

.shared-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 22px;
}

.shared-info > span {
    color: #667085;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.shared-download-disabled {
    margin: 0 22px 20px;
    padding: 11px 13px;
    border-radius: 9px;
    background: #f2f4f7;
    color: #667085;
    font-size: 13px;
    text-align: center;
}

.shared-footer {
    padding: 16px 22px 20px;
    color: #98a2b3;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 600px) {

    .shared-container {
        padding: 10px;
    }

    .shared-card {
        border-radius: 14px;
    }

    .shared-header {
        padding: 18px;
    }

    .shared-header h1 {
        font-size: 19px;
    }

    .shared-preview {
        min-height: 240px;
        padding: 10px;
    }

    .shared-image {
        max-height: 65vh;
    }

    .shared-info {
        align-items: stretch;
        flex-direction: column;
        padding: 18px;
    }

    .shared-info .btn {
        width: 100%;
        text-align: center;
    }

    .shared-download-disabled {
        margin-left: 18px;
        margin-right: 18px;
    }

}


/* Active Secure Share Links */

.share-active-links {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    background: #f9fafb;
}

.share-active-links-header {
    margin-bottom: 12px;
}

.share-active-links-header h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.share-active-links-header p {
    margin: 0;
    color: #667085;
    font-size: 12px;
}

.share-link-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    background: #ffffff;
}

.share-link-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.share-link-details strong {
    font-size: 13px;
}

.share-link-details span {
    color: #667085;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.share-revoke-form {
    flex-shrink: 0;
}

.share-revoke-form .btn {
    min-height: 36px;
    padding: 0 12px;
}

.btn-danger {
    border: 1px solid #d92d20;
    background: #d92d20;
    color: #ffffff;
}

.btn-danger:hover {
    background: #b42318;
}

@media (max-width: 600px) {

    .share-link-item {
        align-items: stretch;
        flex-direction: column;
    }

    .share-revoke-form,
    .share-revoke-form .btn {
        width: 100%;
    }

}

/* Viewer mobile action buttons */
@media (max-width: 600px) {

    body:has(.viewer-section) .viewer-info h1 {
        display: none;
    }

    body:has(.viewer-section) .viewer-info {
        display: block;
        padding: 12px;
    }

    body:has(.viewer-section) .viewer-actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        width: 100%;
        margin: 0;
    }

    body:has(.viewer-section) .viewer-actions > a,
    body:has(.viewer-section) .viewer-actions > button,
    body:has(.viewer-section) .viewer-actions > form {
        width: 100%;
        min-width: 0;
        margin: 0;
        box-sizing: border-box;
    }

    body:has(.viewer-section) .viewer-actions > a,
    body:has(.viewer-section) .viewer-actions > button {
        height: 42px;
        min-height: 42px;
        padding: 0 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        white-space: nowrap;
        overflow: hidden;
    }

    body:has(.viewer-section) .viewer-actions > form {
        display: block;
    }

    body:has(.viewer-section) .viewer-actions > form .viewer-delete {
        width: 100%;
        height: 42px;
        min-height: 42px;
        padding: 0 4px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        overflow: hidden;
    }

}


/* MYCLOUD_LOGIN_LOCATION_UI */

.location-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
}

#locationPermissionMessage {
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.65;
}

.location-countdown {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.location-countdown span:last-child {
    font-size: 13px;
    font-weight: 700;
}

.location-flow-status {
    margin: 11px 0 0;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.72;
}

@media (max-width: 600px) {

    .location-title {
        font-size: 18px;
    }

    #locationPermissionMessage {
        font-size: 13px;
        line-height: 1.6;
    }

    .location-countdown {
        font-size: 28px;
    }

}

/* MYCLOUD_LOGIN_LOCATION_BUTTON */

.location-allow-button {
    margin-top: 18px;
    padding: 11px 18px;
    border: 0;
    border-radius: 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.location-allow-button:active {
    transform: scale(0.97);
}

.location-allow-button:hover {
    opacity: 0.88;
}



/* Viewer image zoom */
body:has(.viewer-section) .viewer-image {
    transform-origin: center center;
    will-change: transform;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
}
