/**
 * NEW_EDMS - Electronic Document Management System
 * Custom Stylesheet
 * Theme: Green and White
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --primary-color: #28a745;
    --primary-dark: #1e7e34;
    --primary-light: #48c76a;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    
    --folder-directorate: #28a745;
    --folder-department: #ffc107;
    
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 60px;
    
    --transition-speed: 0.3s;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --box-shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--primary-dark);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animate-fadeIn { animation: fadeIn 0.5s ease-out; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease-out; }
.animate-fadeInDown { animation: fadeInDown 0.5s ease-out; }
.animate-slideInLeft { animation: slideInLeft 0.5s ease-out; }
.animate-slideInRight { animation: slideInRight 0.5s ease-out; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-bounce { animation: bounce 1s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* Delay classes */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: float 20s linear infinite;
}

.login-box {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    max-width: 120px;
    margin-bottom: 15px;
}

.login-logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
}

.login-logo p {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.form-floating {
    position: relative;
    margin-bottom: 20px;
}

.form-floating input {
    height: 55px;
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 1rem 1rem 0.5rem 3rem;
    transition: all var(--transition-speed);
}

.form-floating input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-floating label {
    padding-left: 3rem;
}

.form-floating .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    z-index: 2;
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    height: 50px;
    border-radius: var(--border-radius);
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all var(--transition-speed);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.4);
}

/* ============================================
   LAYOUT - SIDEBAR & HEADER
   ============================================ */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all var(--transition-speed);
    z-index: 1000;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header img {
    max-width: 60px;
    margin-bottom: 10px;
}

.sidebar-header h4 {
    font-size: 1rem;
    margin: 0;
    color: white;
}

.sidebar-header p {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

.user-panel {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-panel .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.user-panel .info h6 {
    margin: 0;
    font-size: 0.9rem;
    color: white;
}

.user-panel .info p {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
}

.sidebar-menu {
    padding: 15px 0;
}

.sidebar-menu .nav-item {
    margin: 2px 0;
}

.sidebar-menu .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-speed);
    border-left: 3px solid transparent;
}

.sidebar-menu .nav-link:hover,
.sidebar-menu .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: var(--primary-color);
}

.sidebar-menu .nav-link i {
    width: 24px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-menu .nav-link span {
    font-size: 0.9rem;
}

.sidebar-menu .badge {
    margin-left: auto;
    font-size: 0.7rem;
}

/* Submenu */
.sidebar-menu .nav-treeview {
    padding-left: 20px;
    display: none;
}

.sidebar-menu .nav-item.menu-open .nav-treeview {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.sidebar-menu .nav-treeview .nav-link {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all var(--transition-speed);
}

/* Header */
.main-header {
    height: var(--header-height);
    background: white;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    position: sticky;
    top: 0;
    z-index: 999;
}

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

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
}

.sidebar-toggle:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background: none;
}

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

.header-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    position: relative;
    transition: all var(--transition-speed);
}

.header-btn:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.header-btn .badge {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.65rem;
    padding: 2px 5px;
}

/* Content Wrapper */
.content-wrapper {
    padding: 25px;
    min-height: calc(100vh - var(--header-height));
}

/* ============================================
   CARDS & WIDGETS
   ============================================ */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed);
    background: white;
}

.card:hover {
    box-shadow: var(--box-shadow-hover);
}

.card-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
    color: var(--dark-color);
}

.card-body {
    padding: 20px;
}

/* Stat Cards */
.stat-card {
    padding: 25px;
    border-radius: var(--border-radius);
    color: white;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.stat-card.primary { background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%); }
.stat-card.success { background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%); }
.stat-card.warning { background: linear-gradient(135deg, var(--warning-color) 0%, #fd7e14 100%); }
.stat-card.danger { background: linear-gradient(135deg, var(--danger-color) 0%, #c82333 100%); }
.stat-card.info { background: linear-gradient(135deg, var(--info-color) 0%, #138496 100%); }

.stat-card .icon {
    font-size: 3rem;
    opacity: 0.3;
    position: absolute;
    right: 20px;
    top: 20px;
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card .label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ============================================
   FOLDER STYLES
   ============================================ */
.folder-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.folder-item {
    text-align: center;
    padding: 25px 15px;
    border-radius: var(--border-radius);
    background: white;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed);
    cursor: pointer;
    position: relative;
    animation: fadeInUp 0.5s ease-out;
}

.folder-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--box-shadow-hover);
}

.folder-item.directorate {
    border-top: 4px solid var(--folder-directorate);
}

.folder-item.department {
    border-top: 4px solid var(--folder-department);
}

.folder-item .folder-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    transition: all var(--transition-speed);
}

.folder-item.directorate .folder-icon {
    color: var(--folder-directorate);
}

.folder-item.department .folder-icon {
    color: var(--folder-department);
}

.folder-item:hover .folder-icon {
    transform: scale(1.1);
}

.folder-item .folder-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-item .folder-meta {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.folder-item .folder-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.folder-item:hover .folder-actions {
    opacity: 1;
}

/* ============================================
   FILE STYLES
   ============================================ */
.file-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

.file-item {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: all var(--transition-speed);
    cursor: pointer;
    animation: fadeInUp 0.5s ease-out;
}

.file-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

.file-item .file-preview {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    position: relative;
}

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

.file-item .file-preview .file-icon {
    font-size: 3.5rem;
}

.file-item .file-preview .file-type-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.file-item .file-info {
    padding: 15px;
}

.file-item .file-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.file-item .file-meta {
    font-size: 0.75rem;
    color: var(--secondary-color);
    display: flex;
    justify-content: space-between;
}

.file-item .file-actions {
    display: flex;
    border-top: 1px solid #e9ecef;
}

.file-item .file-actions button {
    flex: 1;
    padding: 10px;
    background: none;
    border: none;
    color: var(--secondary-color);
    transition: all var(--transition-speed);
}

.file-item .file-actions button:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

/* File List View */
.file-list {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.file-list-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    transition: all var(--transition-speed);
}

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

.file-list-item:hover {
    background: #f8f9fa;
}

.file-list-item .file-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.3rem;
}

.file-list-item .file-details {
    flex: 1;
}

.file-list-item .file-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 3px;
}

.file-list-item .file-meta {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.file-list-item .file-actions {
    display: flex;
    gap: 5px;
}

/* ============================================
   PDF VIEWER STYLES
   ============================================ */
.pdf-viewer-container {
    display: flex;
    height: calc(100vh - 150px);
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.pdf-viewer {
    flex: 1;
    background: #525659;
    overflow: auto;
    padding: 20px;
}

.pdf-page {
    background: white;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    position: relative;
}

.pdf-page canvas {
    display: block;
    max-width: 100%;
}

.pdf-sidebar {
    width: 350px;
    background: white;
    border-left: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.pdf-sidebar-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-sidebar-tabs {
    display: flex;
    border-bottom: 1px solid #e9ecef;
}

.pdf-sidebar-tabs .tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-speed);
}

.pdf-sidebar-tabs .tab:hover,
.pdf-sidebar-tabs .tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.pdf-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* Comments */
.comment-item {
    padding: 15px;
    border-radius: var(--border-radius);
    background: #f8f9fa;
    margin-bottom: 15px;
    animation: fadeInUp 0.3s ease-out;
}

.comment-item.resolved {
    opacity: 0.6;
}

.comment-item .comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-item .comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-item .comment-author .avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-item .comment-author .name {
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-item .comment-author .time {
    font-size: 0.75rem;
    color: var(--secondary-color);
}

.comment-item .comment-text {
    color: var(--dark-color);
    line-height: 1.5;
    margin-bottom: 10px;
}

.comment-item .comment-actions {
    display: flex;
    gap: 10px;
}

.comment-item .comment-actions button {
    font-size: 0.8rem;
    padding: 5px 12px;
}

/* Notes */
.note-item {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    border-left: 4px solid var(--warning-color);
    animation: slideInRight 0.3s ease-out;
}

.note-item.important {
    border-left-color: var(--danger-color);
    background: #fff5f5;
}

.note-item.private {
    border-left-color: var(--info-color);
    background: #e7f3ff;
}

.note-item .note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.note-item .note-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.note-item .note-content {
    font-size: 0.9rem;
    color: var(--secondary-color);
    line-height: 1.5;
}

.note-item .note-meta {
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin-top: 10px;
}

/* ============================================
   MY DESK STYLES
   ============================================ */
.desk-section {
    margin-bottom: 30px;
}

.desk-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.desk-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.desk-section-title i {
    color: var(--primary-color);
}

.desk-item {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all var(--transition-speed);
    animation: fadeInUp 0.4s ease-out;
}

.desk-item:hover {
    transform: translateX(5px);
    box-shadow: var(--box-shadow-hover);
}

.desk-item.unread {
    border-left: 4px solid var(--primary-color);
}

.desk-item .desk-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.desk-item.forward .desk-icon { background: #e3f2fd; color: #1976d2; }
.desk-item.collaboration .desk-icon { background: #f3e5f5; color: #7b1fa2; }
.desk-item.comment .desk-icon { background: #e8f5e9; color: #388e3c; }
.desk-item.note .desk-icon { background: #fff3e0; color: #f57c00; }

.desk-item .desk-content {
    flex: 1;
}

.desk-item .desk-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.desk-item .desk-description {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.desk-item .desk-meta {
    text-align: right;
}

.desk-item .desk-time {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

.desk-item .desk-actions {
    display: flex;
    gap: 5px;
}

/* ============================================
   ATTENDANCE STYLES
   ============================================ */
.attendance-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 30px;
    text-align: center;
}

.attendance-card .current-time {
    font-size: 3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.attendance-card .current-date {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.attendance-card .status-badge {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 30px;
}

.attendance-card .status-badge.checked-in {
    background: #e8f5e9;
    color: #2e7d32;
}

.attendance-card .status-badge.checked-out {
    background: #ffebee;
    color: #c62828;
}

.attendance-card .status-badge.not-checked {
    background: #fff3e0;
    color: #ef6c00;
}

.attendance-btn {
    padding: 15px 50px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.attendance-btn.check-in {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.attendance-btn.check-out {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c82333 100%);
    color: white;
}

.attendance-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.attendance-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.attendance-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.attendance-stat {
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.attendance-stat .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.attendance-stat .label {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    border-radius: var(--border-radius);
    padding: 10px 20px;
    font-weight: 500;
    transition: all var(--transition-speed);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-action {
    padding: 8px 15px;
    font-size: 0.85rem;
}

.btn-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    z-index: 999;
}

.btn-floating:hover {
    transform: scale(1.1) rotate(90deg);
    background: var(--primary-dark);
}

/* ============================================
   FORMS
   ============================================ */
.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all var(--transition-speed);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 12px 15px;
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.table {
    margin: 0;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    color: var(--dark-color);
    padding: 15px;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* ============================================
   MODALS
   ============================================ */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 20px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 15px 20px;
}

/* ============================================
   ALERTS & NOTIFICATIONS
   ============================================ */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 15px 20px;
}

.alert-dismissible .btn-close {
    padding: 15px;
}

.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

.toast {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-hover);
    animation: slideInRight 0.3s ease-out;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    padding: 6px 12px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge-pending { background: #fff3e0; color: #ef6c00; }
.badge-approved { background: #e8f5e9; color: #2e7d32; }
.badge-rejected { background: #ffebee; color: #c62828; }
.badge-draft { background: #e3f2fd; color: #1976d2; }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    justify-content: center;
    margin-top: 30px;
}

.page-link {
    border: none;
    color: var(--dark-color);
    padding: 10px 15px;
    margin: 0 3px;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background: var(--primary-color);
}

/* ============================================
   SEARCH & FILTERS
   ============================================ */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 45px;
    border-radius: 50px;
}

.search-box .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

.filter-bar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-bar .form-select,
.filter-bar .form-control {
    min-width: 150px;
}

/* ============================================
   LOADING & SPINNER
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .sidebar,
    .main-header,
    .btn-floating,
    .no-print {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1199px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 991px) {
    .folder-container {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .file-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .pdf-viewer-container {
        flex-direction: column;
        height: auto;
    }
    
    .pdf-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid #e9ecef;
        max-height: 400px;
    }
    
    .attendance-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .content-wrapper {
        padding: 15px;
    }
    
    .stat-card .number {
        font-size: 2rem;
    }
    
    .folder-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .folder-item {
        padding: 15px 10px;
    }
    
    .folder-item .folder-icon {
        font-size: 3rem;
    }
    
    .file-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .desk-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .desk-item .desk-meta {
        text-align: center;
    }
    
    .attendance-card .current-time {
        font-size: 2rem;
    }
    
    .attendance-stats {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .filter-bar .form-select,
    .filter-bar .form-control {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .login-box {
        padding: 30px 20px;
        margin: 15px;
    }
    
    .main-header {
        padding: 0 15px;
    }
    
    .breadcrumb {
        display: none;
    }
    
    .folder-container,
    .file-container {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-card .number {
        font-size: 1.8rem;
    }
    
    .stat-card .icon {
        font-size: 2rem;
    }
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode
    body {
        background-color: #1a1a2e;
        color: #e0e0e0;
    }
    
    .card {
        background: #16213e;
    }
    
    .card-header {
        background: #16213e;
        border-bottom-color: #2a2a4a;
    }
    */
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.border-primary { border-color: var(--primary-color) !important; }

.cursor-pointer { cursor: pointer; }
.user-select-none { user-select: none; }

.transition-all { transition: all var(--transition-speed); }
.hover-lift:hover { transform: translateY(-3px); }
.hover-scale:hover { transform: scale(1.02); }

.shadow-sm { box-shadow: 0 2px 5px rgba(0,0,0,0.08) !important; }
.shadow { box-shadow: var(--box-shadow) !important; }
.shadow-lg { box-shadow: var(--box-shadow-hover) !important; }

.rounded { border-radius: var(--border-radius) !important; }

/* Tooltip custom styles */
.custom-tooltip {
    position: relative;
}

.custom-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed);
}

.custom-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 5px);
}

/* ============================================
   FILE CARDS
   ============================================ */
.file-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e9ecef;
    animation: fadeInUp 0.5s ease;
}

.file-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.file-card .card-body {
    padding: 1.5rem;
}

.file-card .card-footer {
    padding: 0.75rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.file-card:hover .card-footer {
    background: #e9ecef;
}

/* Drop zone styles */
#dropZone {
    transition: all 0.3s ease;
    border: 2px dashed #ced4da;
}

#dropZone:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

#dropZone.dragover {
    border-color: var(--primary-color);
    background: #e8f5e9;
    transform: scale(1.02);
}

/* ============================================
   ANIMATED ELEMENTS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.animate-fadeIn { animation: fadeIn 0.5s ease-out; }
.animate-fadeInUp { animation: fadeInUp 0.5s ease-out; }
.animate-fadeInDown { animation: fadeInDown 0.5s ease-out; }
.animate-slideInRight { animation: slideInRight 0.5s ease-out; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-bounce { animation: bounce 1s infinite; }

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ============================================
   BUTTON ANIMATIONS
   ============================================ */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

/* ============================================
   MODAL ANIMATIONS
   ============================================ */
.modal.fade .modal-dialog {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.9) translateY(-20px);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s;
    min-width: 300px;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   HOVER EFFECTS
   ============================================ */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.hover-scale {
    transition: all 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
}

/* ============================================
   BADGE ANIMATIONS
   ============================================ */
.badge {
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.1);
}

/* ============================================
   NAV LINK ANIMATIONS
   ============================================ */
.nav-link {
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ============================================
   FORM INPUT ANIMATIONS
   ============================================ */
.form-control, .form-select {
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    transform: translateY(-1px);
}

/* ============================================
   TABLE ROW ANIMATIONS
   ============================================ */
.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

/* ============================================
   FOLDER ITEMS
   ============================================ */
.folder-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease;
}

.folder-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.folder-item .folder-icon {
    transition: all 0.3s ease;
}

.folder-item:hover .folder-icon {
    transform: scale(1.1);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .btn-group .btn {
        flex: 1;
        margin-bottom: 0.25rem;
    }
    
    .file-card {
        margin-bottom: 1rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .sidebar, .main-header, .btn, .modal {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
