/* Library Management System - Custom Styles */

:root {
    --primary-color: #6366f1;
    --secondary-color: #4f46e5;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --sidebar-width: 260px;
    --topbar-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: #333;
}

/* Landing Page Styles */
.landing-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.landing-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.landing-hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.nav-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    text-decoration: none;
    color: inherit;
    display: block;
}

.nav-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    color: inherit;
    text-decoration: none;
}

.nav-card .bi {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.nav-card h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark-color);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu-item {
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.sidebar-menu-item.active {
    background: rgba(99, 102, 241, 0.2);
    color: white;
    border-left-color: var(--primary-color);
}

.sidebar-menu-item .bi {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

.sidebar-section {
    margin-top: 1.5rem;
}

.sidebar-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}

.sidebar-submenu {
    padding-left: 1rem;
}

.sidebar-submenu .sidebar-menu-item {
    padding-left: 3rem;
    font-size: 0.9rem;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.topbar-icons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.topbar-icon {
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    position: relative;
}

.topbar-icon .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.topbar-date {
    font-size: 0.9rem;
    margin-left: 1rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 2rem;
    min-height: calc(100vh - var(--topbar-height));
}

.content-header {
    margin-bottom: 2rem;
}

.content-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.content-header p {
    color: #64748b;
}

/* Statistics Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stat-card-title {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.stat-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.stat-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.stat-tag.green {
    background: #d1fae5;
    color: #065f46;
}

.stat-tag.red {
    background: #fee2e2;
    color: #991b1b;
}

.stat-tag.blue {
    background: #dbeafe;
    color: #1e40af;
}

.stat-tag.orange {
    background: #fed7aa;
    color: #9a3412;
}

.stat-tag.gray {
    background: #f1f5f9;
    color: #475569;
}

/* Icon Colors */
.icon-purple {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}

.icon-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.icon-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.icon-red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.icon-yellow {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

/* Forms */
.form-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 0 auto;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

/* Tables */
.table-container {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: var(--light-color);
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: var(--dark-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fed7aa;
    color: #9a3412;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .topbar {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .landing-hero h1 {
        font-size: 2rem;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-sm {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.rounded-lg {
    border-radius: 15px;
}
