/* ============================================
   KITABWALAH USED BOOKS - MAIN STYLESHEET
   Yellow & Black Theme
============================================= */

/* ===== CSS Variables ===== */
:root {
    /* Color Palette */
    --primary-yellow: #FFD700;
    --dark-yellow: #FFC107;
    --light-yellow: #FFF9C4;
    --gold-gradient: linear-gradient(135deg, #FFD700, #FFA000);
    
    --primary-black: #212121;
    --dark-black: #000000;
    --light-black: #424242;
    --gray-black: #333333;
    
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --medium-gray: #9E9E9E;
    --dark-gray: #757575;
    
    /* Status Colors */
    --success: #4CAF50;
    --error: #F44336;
    --warning: #FF9800;
    --info: #2196F3;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--primary-black);
    background-color: var(--light-gray);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-sm);
    color: var(--primary-black);
}

h1 {
    font-size: var(--text-4xl);
}

h2 {
    font-size: var(--text-3xl);
}

h3 {
    font-size: var(--text-2xl);
}

p {
    margin-bottom: var(--space-sm);
}

a {
    color: var(--primary-yellow);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--dark-yellow);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: var(--text-base);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--dark-black);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-black);
    border: 2px solid var(--primary-yellow);
}

.btn-secondary:hover {
    background: var(--primary-yellow);
    color: var(--dark-black);
}

.btn-outline {
    background: transparent;
    color: var(--primary-black);
    border: 2px solid var(--medium-gray);
}

.btn-outline:hover {
    border-color: var(--primary-yellow);
    color: var(--primary-yellow);
}

.btn-danger {
    background: var(--error);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--text-sm);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: var(--text-lg);
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Header & Navigation ===== */
.main-header {
    background: var(--dark-black);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gold-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--dark-black);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary-yellow);
}

.nav-link.active {
    background: var(--primary-yellow);
    color: var(--dark-black);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-yellow);
    border-radius: 50%;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-yellow);
    color: var(--dark-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.user-avatar:hover {
    transform: scale(1.05);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    min-width: 200px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: 1000;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: var(--primary-black);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--light-gray);
    color: var(--primary-yellow);
}

.dropdown-divider {
    height: 1px;
    background: var(--light-gray);
    margin: 0.5rem 0;
}

.cart-badge {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--error);
    color: var(--white);
    font-size: 0.75rem;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== Hero Section ===== */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.9), rgba(33,33,33,0.95)), url('../assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    padding: var(--space-xl) 0;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-md);
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: var(--text-xl);
    color: var(--light-yellow);
    margin-bottom: var(--space-xl);
    opacity: 0.9;
}

.hero-search {
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

.search-box {
    display: flex;
    background: var(--white);
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: var(--text-base);
}

.search-select {
    padding: 1rem;
    border: none;
    border-left: 1px solid var(--light-gray);
    outline: none;
    background: var(--white);
    color: var(--primary-black);
    min-width: 180px;
}

.search-btn {
    background: var(--gold-gradient);
    color: var(--dark-black);
    border: none;
    padding: 0 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.search-btn:hover {
    padding: 0 2.5rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
    margin-top: var(--space-xl);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: var(--text-4xl);
    font-weight: 800;
    color: var(--primary-yellow);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--light-yellow);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Categories Section ===== */
.categories-section {
    padding: var(--space-xl) 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-sm);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gold-gradient);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--dark-gray);
    font-size: var(--text-lg);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.category-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    text-decoration: none;
    color: var(--primary-black);
    border: 2px solid transparent;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-yellow);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 60px;
    height: 60px;
    background: var(--gold-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-sm);
    font-size: 1.5rem;
    color: var(--dark-black);
}

.category-card h3 {
    font-size: var(--text-lg);
    margin-bottom: 0.5rem;
}

.category-count {
    font-size: var(--text-sm);
    color: var(--medium-gray);
}

/* ===== Featured Books ===== */
.featured-section {
    padding: var(--space-xl) 0;
    background: var(--light-gray);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.book-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.book-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-yellow);
    color: var(--dark-black);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

.book-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.book-card:hover .book-image img {
    transform: scale(1.05);
}

.book-info {
    padding: var(--space-lg);
}

.book-title {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-black);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-author {
    color: var(--medium-gray);
    font-size: var(--text-sm);
    margin-bottom: var(--space-sm);
}

.book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.book-price {
    font-size: var(--text-xl);
    font-weight: 800;
    color: var(--primary-yellow);
}

.book-price del {
    font-size: var(--text-sm);
    color: var(--medium-gray);
    margin-left: 0.5rem;
}

.book-city {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: var(--text-sm);
    color: var(--dark-gray);
    background: var(--light-gray);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
}

.book-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

/* ===== How It Works ===== */
.how-it-works {
    padding: var(--space-xl) 0;
    background: var(--dark-black);
    color: var(--white);
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.step-card {
    text-align: center;
    padding: var(--space-lg);
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gold-gradient);
    color: var(--dark-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    font-weight: 800;
    margin: 0 auto var(--space-md);
    position: relative;
    z-index: 1;
}

.step-card:nth-child(1) .step-number::after,
.step-card:nth-child(2) .step-number::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: calc(100% + var(--space-xl));
    height: 2px;
    background: var(--primary-yellow);
    opacity: 0.3;
    z-index: 0;
}

.step-icon {
    font-size: 3rem;
    color: var(--primary-yellow);
    margin-bottom: var(--space-md);
}

.step-card h3 {
    color: var(--primary-yellow);
    margin-bottom: var(--space-sm);
}

/* ===== Testimonials ===== */
.testimonials-section {
    padding: var(--space-xl) 0;
    background: var(--white);
}

.testimonials-slider {
    position: relative;
    overflow: hidden;
}

.testimonial-card {
    background: var(--light-gray);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    margin: 0 auto;
    max-width: 600px;
}

.testimonial-text {
    font-size: var(--text-lg);
    font-style: italic;
    color: var(--primary-black);
    margin-bottom: var(--space-lg);
    position: relative;
}

.testimonial-text::before,
.testimonial-text::after {
    content: '"';
    font-size: var(--text-4xl);
    color: var(--primary-yellow);
    opacity: 0.3;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.author-avatar {
    width: 50px;
    height: 50px;
    background: var(--gold-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--dark-black);
}

.author-info h4 {
    margin-bottom: 0.25rem;
}

.author-info p {
    font-size: var(--text-sm);
    color: var(--medium-gray);
    margin-bottom: 0;
}

/* ===== Footer ===== */
.main-footer {
    background: var(--dark-black);
    color: var(--white);
    padding: var(--space-xl) 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-logo {
    font-size: var(--text-2xl);
    font-weight: 800;
    color: var(--primary-yellow);
    margin-bottom: var(--space-sm);
    display: inline-block;
}

.footer-description {
    color: var(--medium-gray);
    line-height: 1.8;
}

.footer-links h3 {
    color: var(--primary-yellow);
    margin-bottom: var(--space-md);
    font-size: var(--text-lg);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--medium-gray);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary-yellow);
}

.footer-contact p {
    color: var(--medium-gray);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: var(--space-md);
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-yellow);
    color: var(--dark-black);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-md) 0;
    text-align: center;
    color: var(--medium-gray);
    font-size: var(--text-sm);
}

/* ===== Forms ===== */
.form-container {
    max-width: 500px;
    margin: var(--space-xl) auto;
    padding: var(--space-xl);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.form-header h1 {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-black);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    transition: all var(--transition-fast);
    background: var(--white);
    color: var(--primary-black);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
}

.form-control.error {
    border-color: var(--error);
}

.form-text {
    font-size: var(--text-sm);
    color: var(--medium-gray);
    margin-top: 0.5rem;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239E9E9E' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 3rem;
}

/* ===== Dashboard Styles ===== */
.dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 76px);
}

.dashboard-sidebar {
    background: var(--dark-black);
    color: var(--white);
    padding: var(--space-lg) 0;
}

.sidebar-header {
    padding: 0 var(--space-lg) var(--space-lg);
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.user-profile .user-avatar {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
}

.user-info h3 {
    color: var(--primary-yellow);
    margin-bottom: 0.25rem;
}

.user-info p {
    color: var(--medium-gray);
    font-size: var(--text-sm);
    margin-bottom: 0;
}

.sidebar-menu {
    padding: var(--space-lg) 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 1rem var(--space-lg);
    color: var(--medium-gray);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary-yellow);
    border-left-color: var(--primary-yellow);
}

.menu-item.active {
    background: rgba(255, 215, 0, 0.15);
    color: var(--primary-yellow);
    border-left-color: var(--primary-yellow);
}

.menu-item i {
    width: 20px;
    text-align: center;
}

.menu-badge {
    margin-left: auto;
    background: var(--primary-yellow);
    color: var(--dark-black);
    font-size: var(--text-xs);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.dashboard-main {
    padding: var(--space-xl);
    background: var(--light-gray);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.dashboard-title {
    font-size: var(--text-3xl);
    color: var(--primary-black);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--primary-yellow);
    transition: transform var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-yellow);
    font-size: 1.5rem;
}

.stat-title {
    font-size: var(--text-sm);
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--primary-black);
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: var(--text-sm);
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-change.negative {
    color: var(--error);
}

/* ===== Tables ===== */
.data-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border-collapse: collapse;
}

.data-table thead {
    background: var(--dark-black);
    color: var(--white);
}

.data-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: var(--text-sm);
}

.data-table tbody tr {
    border-bottom: 1px solid var(--light-gray);
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--light-gray);
}

.data-table td {
    padding: 1rem 1.5rem;
    color: var(--primary-black);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(244, 67, 54, 0.1);
    color: var(--error);
}

.badge-info {
    background: rgba(33, 150, 243, 0.1);
    color: var(--info);
}

.badge-yellow {
    background: rgba(255, 215, 0, 0.1);
    color: var(--dark-yellow);
}

/* ===== Alerts ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid var(--success);
    color: var(--success);
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border-left: 4px solid var(--error);
    color: var(--error);
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    border-left: 4px solid var(--warning);
    color: var(--warning);
}

.alert-info {
    background: rgba(33, 150, 243, 0.1);
    border-left: 4px solid var(--info);
    color: var(--info);
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: var(--space-xl);
}

.page-item {
    list-style: none;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--primary-black);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.page-link:hover {
    border-color: var(--primary-yellow);
    color: var(--primary-yellow);
}

.page-link.active {
    background: var(--primary-yellow);
    color: var(--dark-black);
    border-color: var(--primary-yellow);
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: translateY(-20px);
    transition: transform var(--transition-normal);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin-bottom: 0;
    color: var(--primary-black);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--medium-gray);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--error);
}

.modal-body {
    padding: var(--space-lg);
}

.modal-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

/* ===== Loader ===== */
.loader {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary-yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        display: none;
    }
    
    .dashboard-sidebar.mobile-open {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        z-index: 1001;
        overflow-y: auto;
    }
    
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
    }
    
    .mobile-menu-overlay.show {
        display: block;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-wrap: wrap;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        order: 3;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-links.mobile-open {
        display: flex;
        flex-direction: column;
    }
    
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-base);
    }
    
    .search-box {
        flex-direction: column;
        border-radius: var(--radius-lg);
    }
    
    .search-input,
    .search-select,
    .search-btn {
        width: 100%;
        border-radius: 0;
        border: none;
        border-bottom: 1px solid var(--light-gray);
    }
    
    .search-btn {
        border-bottom: none;
    }
    
    .hero-stats {
        gap: var(--space-lg);
    }
    
    .stat-number {
        font-size: var(--text-2xl);
    }
    
    .books-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .steps-container {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .step-card:nth-child(1) .step-number::after,
    .step-card:nth-child(2) .step-number::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    .form-container {
        padding: var(--space-md);
    }
    
    .dashboard-main {
        padding: var(--space-md);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .book-actions {
        grid-template-columns: 1fr;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
    
    .data-table {
        font-size: var(--text-sm);
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    .main-header,
    .main-footer,
    .btn,
    .modal,
    .mobile-menu-btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
}