﻿:root {
    /* ===== Colors ===== */
    --color-primary: #3B5BC0;
    --color-secondary: #314da5;
    --color-accent: #FFDD00;
    --color-success: #22c55e;
    --color-danger: #ef4444;
    --color-warning: #eab308;
    --color-background: #ffffff;
    --color-surface: #ffffff;
    --color-on-surface: #ffffff;
    --color-border: #e5e7eb;
    --color-text: #1a1a1a;
    --color-text-muted: #6b7280;
    /* ===== Fonts ===== */
    --font-family: "Times New Roman", Times, serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: 2rem;
    /* ===== Spacing ===== */
    --space-0: 0rem;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 3rem;
    /* ===== Radius ===== */
    --radius-sm: 0.2rem;
    --radius-md: 0.25rem;
    --radius-lg: 0.3rem;
    --radius-xl: 0.5rem;
    --radius-2xl: 1rem;
    --radius-pill: 50rem;
    --radius-circle: 50%;
    /* ===== Border ===== */
    --border-1: .0625rem;
    --border-2: .125rem;
    --border-3: .1875rem;
    --border-4: .25rem;
    --border-5: .3125rem;
    /* ===== Shadows ===== */
    --box-shadow-sm: 0 .125rem .25rem rgba(0, 0, 0, .075);
    --box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
    --box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, .175);
    /* Right Bottom */
    --box-shadow-right-bottom-sm: .25rem .25rem .5rem rgba(0, 0, 0, 0.1);
    --box-shadow-right-bottom: .5rem .75rem 1.25rem rgba(0, 0, 0, 0.15);
    --box-shadow-right-bottom-lg: 1rem 1.5rem 3rem rgba(0, 0, 0, 0.2);
    /* Right Top */
    --box-shadow-right-top-sm: .25rem -.25rem .5rem rgba(0, 0, 0, 0.1);
    --box-shadow-right-top: .5rem -.75rem 1.25rem rgba(0, 0, 0, 0.15);
    --box-shadow-right-top-lg: 1rem -1.5rem 3rem rgba(0, 0, 0, 0.2);
    /* Left Bottom */
    --box-shadow-left-bottom-sm: -.25rem .25rem .5rem rgba(0, 0, 0, 0.1);
    --box-shadow-left-bottom: -.5rem .75rem 1.25rem rgba(0, 0, 0, 0.15);
    --box-shadow-left-bottom-lg: -1rem 1.5rem 3rem rgba(0, 0, 0, 0.2);
    /* Left Top */
    --box-shadow-left-top-sm: -.25rem -.25rem .5rem rgba(0, 0, 0, 0.1);
    --box-shadow-left-top: -.5rem -.75rem 1.25rem rgba(0, 0, 0, 0.15);
    --box-shadow-left-top-lg: -1rem -1.5rem 3rem rgba(0, 0, 0, 0.2);
    /* Top only */
    --box-shadow-top-sm: 0 -.25rem .5rem rgba(0, 0, 0, 0.1);
    --box-shadow-top: 0 -.5rem 1rem rgba(0, 0, 0, 0.15);
    --box-shadow-top-lg: 0 -1rem 2rem rgba(0, 0, 0, 0.2);
    /* Bottom only */
    --box-shadow-bottom-sm: 0 .25rem .5rem rgba(0, 0, 0, 0.1);
    --box-shadow-bottom: 0 .5rem 1rem rgba(0, 0, 0, 0.15);
    --box-shadow-bottom-lg: 0 1rem 2rem rgba(0, 0, 0, 0.2);
    /* Right only */
    --box-shadow-right-sm: .25rem 0 .5rem rgba(0, 0, 0, 0.1);
    --box-shadow-right: .5rem 0 1rem rgba(0, 0, 0, 0.15);
    --box-shadow-right-lg: 1rem 0 2rem rgba(0, 0, 0, 0.2);
    /* Left only */
    --box-shadow-left-sm: -.25rem 0 .5rem rgba(0, 0, 0, 0.1);
    --box-shadow-left: -.5rem 0 1rem rgba(0, 0, 0, 0.15);
    --box-shadow-left-lg: -1rem 0 2rem rgba(0, 0, 0, 0.2);
    /* Right Bottom */
    --text-shadow-right-bottom-sm: .0625rem .0625rem .125rem rgba(0, 0, 0, 0.25);
    --text-shadow-right-bottom: .125rem .125rem .25rem rgba(0, 0, 0, 0.3);
    --text-shadow-right-bottom-lg: .25rem .25rem .375rem rgba(0, 0, 0, 0.35);
    /* Right Top */
    --text-shadow-right-top-sm: .0625rem -.0625rem .125rem rgba(0, 0, 0, 0.25);
    --text-shadow-right-top: .125rem -.125rem .25rem rgba(0, 0, 0, 0.3);
    --text-shadow-right-top-lg: .25rem -.25rem .375rem rgba(0, 0, 0, 0.35);
    /* Left Bottom */
    --text-shadow-left-bottom-sm: -.0625rem .0625rem .125rem rgba(0, 0, 0, 0.25);
    --text-shadow-left-bottom: -.125rem .125rem .25rem rgba(0, 0, 0, 0.3);
    --text-shadow-left-bottom-lg: -.25rem .25rem .375rem rgba(0, 0, 0, 0.35);
    /* Left Top */
    --text-shadow-left-top-sm: -.0625rem -.0625rem .125rem rgba(0, 0, 0, 0.25);
    --text-shadow-left-top: -.125rem -.125rem .25rem rgba(0, 0, 0, 0.3);
    --text-shadow-left-top-lg: -.25rem -.25rem .375rem rgba(0, 0, 0, 0.35);
    /* Top only */
    --text-shadow-top-sm: 0 -.0625rem .125rem rgba(0, 0, 0, 0.25);
    --text-shadow-top: 0 -.125rem .25rem rgba(0, 0, 0, 0.3);
    --text-shadow-top-lg: 0 -.25rem .375rem rgba(0, 0, 0, 0.35);
    /* Bottom only */
    --text-shadow-bottom-sm: 0 .0625rem .125rem rgba(0, 0, 0, 0.25);
    --text-shadow-bottom: 0 .125rem .25rem rgba(0, 0, 0, 0.3);
    --text-shadow-bottom-lg: 0 .25rem .375rem rgba(0, 0, 0, 0.35);
    /* Right only */
    --text-shadow-right-sm: .0625rem 0 .125rem rgba(0, 0, 0, 0.25);
    --text-shadow-right: .125rem 0 .25rem rgba(0, 0, 0, 0.3);
    --text-shadow-right-lg: .25rem 0 .375rem rgba(0, 0, 0, 0.35);
    /* Left only */
    --text-shadow-left-sm: -.0625rem 0 .125rem rgba(0, 0, 0, 0.25);
    --text-shadow-left: -.125rem 0 .25rem rgba(0, 0, 0, 0.3);
    --text-shadow-left-lg: -.25rem 0 .375rem rgba(0, 0, 0, 0.35);
    /* ===== Breakpoints ===== */
    --breakpoint-xs: 0px;
    --breakpoint-sm: 576px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 992px;
    --breakpoint-xl: 1200px;
    --breakpoint-xxl: 1400px;
}

/* ===== General / Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== Base Styles ===== */
html,
body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    overflow-x: hidden;
}

a {
    color: var(--color-primary);
}

/* ===== Auth Page ===== */
/*.auth-page {
    background: linear-gradient(to bottom, var(--color-primary) 5%, var(--color-background) 100%);
}*/

.auth-page {
    position: relative;
    overflow: hidden;
}

    .auth-page::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url("/img/background.jpg");
        background-size: cover;
        background-position: center;
        filter: blur(0rem);
        transform: scale(1);
        z-index: -1;
    }

    .auth-page::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient( to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.5) 60%, rgba(255, 255, 255, 0.9) 100% );
        z-index: -1;
    }

    .auth-page .card-body {
        width: 33rem;
    }

    .auth-page .logo-img {
        width: 4rem;
        width: 3.5rem;
    }

    .auth-page .login-form,
    .auth-page .forgot-password-form {
        border-top: 0.1rem solid var(--color-border);
    }

    .auth-page .subtitle {
        color: var(--color-text);
    }

    .auth-page .btn {
        background-color: var(--color-primary);
        color: var(--color-surface);
        border: var(--color-background);
    }

        .auth-page .btn:focus {
            background-color: var(--color-secondary);
            color: var(--color-surface);
        }

@media screen and (max-width: 768px) {
    .auth-page .company-name {
        display: none;
    }

    .auth-page .card-body {
        width: 23rem;
    }
}

/* ===== Main Page ===== */

header .header-container,
footer {
    background-color: var(--color-primary);
    color: var(--color-background);
}

/* Header */

header {
    box-shadow: var(--box-shadow-right-bottom-sm);
    border-radius: 0 0 0.5rem 0.5rem;
}

.header-container {
    border-bottom: var(--border-2) solid var(--color-accent);
}

.header-left .logo-img {
    width: 5.5rem;
    height: 5rem;
}

.header-left .title {
    border-left: var(--border-2) solid var(--color-background);
    border-right: var(--border-2) solid var(--color-background);
    letter-spacing: 0.1rem;
}

.header-left .company-name,
.header-left .system-name {
    text-shadow: var(--text-shadow-right-bottom-lg);
}

.header-left .company-name {
    font-size: var(--font-size-xl);
}

.header-left .system-name {
    font-size: var(--font-size-lg);
}

.header-right .avatar {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
}

.header-right .full-name {
    font-size: var(--font-size-xs);
}

.header-right .user-information .btn {
    color: var(--color-background);
    border: none !important;
    outline: none !important;
}

.nav-menu .navbar-brand {
    display: none;
}

.nav-menu .nav-link {
    border-bottom: var(--border-2) solid var(--color-text);
    color: var(--color-text);
    font-size: var(--font-size-sm);
}

.dropdown-menu li {
    font-size: var(--font-size-sm);
}

.nav-menu .nav-active,
.nav-menu .nav-link:focus,
.nav-menu .nav-link:hover {
    border-bottom: var(--border-2) solid var(--color-primary);
    color: var(--color-primary);
}

.header-right .dropdown-menu .dropdown-item:hover,
.header-right .dropdown-menu .dropdown-item:focus,
.nav-menu .dropdown-menu .dropdown-item:hover,
.nav-menu .dropdown-menu .dropdown-item:focus {
    background-color: var(--color-primary);
    color: var(--color-background);
}

@media screen and (max-width: 992px) {
    .header-left {
        border-bottom: var(--border-2) solid var(--color-accent);
    }

        .header-left .logo-img {
            width: 4.5rem;
            height: 4rem;
        }

        .header-left .title {
            border: none;
        }

        .header-left .company-name {
            display: none;
        }

        .header-left .system-name {
            font-size: var(--font-size-base);
        }

    .header-right {
        margin: 0 0.5rem;
    }

        .header-right .avatar {
            width: 2rem;
            height: 2rem;
        }

    .nav-menu li {
        text-align: center;
    }

    .nav-menu a {
        border: none !important;
        outline: none !important;
        font-size: var(--font-size-lg);
    }

    .nav-menu .navbar-brand {
        color: var(--color-primary);
        display: block;
    }
}

@media screen and (max-width: 1300px) {
    .nav-menu a {
        font-size: var(--font-size-sm);
    }

    .nav-menu i {
        font-size: var(--font-size-sm);
    }
}

/* Body */
.body .card {
    box-shadow: var(--box-shadow-right-bottom-sm);
}

.body .data-table {
    border-left: var(--border-2) solid var(--color-border);
}

.body .search-container {
    width: 20rem;
}

#filter-content {
    display: block;
    transition: all 0.3s ease;
}

#filter-toggle-icon.rotated {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

table th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}

table td:first-child,
table td:last-child {
    text-align: center;
}

table td:first-child {
    font-weight: bold;
}

.table-wrapper {
    overflow-x: auto;
    max-height: 70vh;
}

.data-table .table th,
.data-table .table td {
    max-width: 20rem;
    overflow: hidden;
    font-size: 0.95rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.text-word {
    color: #2B579A;
}

.text-excel {
    color: #217346;
}

.text-powerpoint {
    color: #D24726;
}

.text-pdf {
    color: #E53E3E;
}

.text-autocad {
    color: #C41E3A;
}

.text-zip {
    color: #F39C12;
}

.text-file {
    color: #6C757D;
}

.title-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
}

.title-text {
    min-width: 0;
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

table .badge {
    flex-shrink: 0;
    margin-left: auto;
    display: inline-block;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.1875rem 0.5rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    text-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.5);
    animation: gentleBlink 2s ease-in-out infinite;
}

table .badge-new {
    background-color: #dc3545;
}

table .badge-updated {
    background-color: #3B82F6;
}

@keyframes gentleBlink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0.375rem rgba(220, 53, 69, 0.6), 0 0 0.625rem rgba(220, 53, 69, 0.4);
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 0.25rem rgba(220, 53, 69, 0.4), 0 0 0.5rem rgba(220, 53, 69, 0.2);
    }
}

/* Dropdown options wrap when long */
.select2-container .select2-results__option {
    white-space: normal;
    word-break: break-word;
}

/* Selected value shows ellipsis when long */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-breadcrumb .active {
    color: var(--color-primary);
}

.create-form input,
.create-form select {
    box-shadow: var(--box-shadow-bottom-sm);
}

#clear-search-btn {
    display: none;
}

@media screen and (max-width: 991px) {

    .body .data-table {
        border: none;
    }
}

/* Home */

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, var(--color-primary) 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
}

.hero-icon {
    font-size: 10rem;
    opacity: 0.8;
}

.section-title {
    color: black;
}

.system-description {
    letter-spacing: 0.05rem;
    line-height: 2;
    opacity: 1;
}

@media (max-width: 992px) {
    .hero-section .col-12.col-lg-8 {
        text-align: center;
    }

    .system-description,
    .hero-icon {
        display: none;
    }
}

.stat-card {
    border: none;
    border-radius: 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

    .stat-card:hover {
        transform: translateY(-0.25rem);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    }

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.group-card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    height: 100%;
}

    .group-card:hover {
        border-color: var(--color-primary);
        box-shadow: 0 0.25rem 0.75rem rgba(102, 126, 234, 0.25);
        transform: translateY(-0.125rem);
    }

    .group-card .group-icon {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

.group-icon {
    color: var(--color-primary);
}

.recent-doc-item {
    border-left: 3px solid var(--color-primary);
    padding-left: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

    .recent-doc-item:hover {
        border-left-color: #764ba2;
        padding-left: 1.25rem;
    }

/* Directory Tree Styles */
.directory-tree {
    font-size: 0.95rem;
}

.group-header,
.type-header,
.subType-header {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
    user-select: none;
}

    .tree-header:hover {
        background-color: #f8f9fa;
    }

.tree-icon {
    transition: transform 0.3s ease;
    width: 1rem;
    text-align: center;
}


.tree-item {
    margin-left: 0;
}

.tree-leaf {
    padding: 0.375rem 0.5rem;
    margin-left: 1.5rem;
    border-left: 2px solid #e9ecef;
    transition: all 0.2s ease;
}

    .tree-leaf:hover {
        background-color: #f8f9fa;
        border-left-color: var(--color-primary);
        padding-left: 0.75rem;
    }

    .tree-leaf a {
        color: #495057;
    }

        .tree-leaf a:hover {
            color: var(--color-primary);
        }

.user-profile .avatar {
    width: 9.5rem;
    height: 9.5rem;
    object-fit: cover;
}

/* Footer */
footer {
    box-shadow: var(--box-shadow-right-top-sm);
    border-radius: 0.5rem 0.5rem 0 0;
}
