/* ================================
   NSBM Library Profile Page - Modern Design
   ================================ */

/* CSS Variables */
:root {
    /* Primary Colors */
    --primary: #3b82f6;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Status Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    /* Semantic Colors */
    --white: #ffffff;
    --black: #000000;
    --background: #f9fafb;
    --surface: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    
    /* Line Heights */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.75;
    
    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition: 200ms ease-in-out;
    --transition-slow: 300ms ease-in-out;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
}

/* ================================
   BASE STYLES & RESET
   ================================ */

/* Page Reset and Base */
.profile-page {
    font-family: var(--font-family);
    background-color: var(--background);
    color: var(--text-primary);
    line-height: var(--leading-normal);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.profile-page *,
.profile-page *::before,
.profile-page *::after {
    box-sizing: border-box;
}

/* Main Content Container */
.main-content {
    padding-top: 0;
    min-height: calc(100vh - 80px); /* Adjust based on header height */
}

/* Container Adjustments */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Typography Base */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    margin: 0;
    color: var(--text-primary);
}

p {
    margin: 0;
    line-height: var(--leading-normal);
    color: var(--text-secondary);
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-700);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ================================
   PROFILE HEADER SECTION
   ================================ */

.profile-header {
    padding: var(--spacing-2xl) 0 var(--spacing-xl);
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.profile-hero-card {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    margin: 0 auto;
    max-width: 1200px;
}

.profile-cover {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow: hidden;
}

.profile-cover-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.2) 0%, transparent 50%);
}

.profile-info-section {
    position: relative;
    padding-top: 60px;
}

/* Profile Avatar Section */
.profile-avatar-section {
    display: flex;
    align-items: flex-end;
    gap: var(--spacing-lg);
}

.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-full);
    border: 4px solid rgba(255, 255, 255, 0.9);
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.profile-avatar-large:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.avatar-status {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    border: 3px solid white;
    background: var(--success);
}

.avatar-status.online {
    background: var(--success);
}

.avatar-status.away {
    background: var(--warning);
}

.avatar-status.offline {
    background: var(--gray-400);
}

/* Profile Basic Info */
.profile-basic-info {
    color: white;
    flex: 1;
}

.profile-name {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-bold);
    color: white;
    margin-bottom: var(--spacing-xs);
}

.profile-id {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-md);
    font-weight: var(--font-medium);
}

.profile-badges {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.badge-primary,
.badge-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: var(--font-medium);
    transition: var(--transition);
}

.badge-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-secondary {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-primary:hover,
.badge-secondary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Profile Stats Grid */
.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
}

.stat-item {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.stat-value {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-bold);
    color: white;
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.8);
    font-weight: var(--font-medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ================================
   MAIN CONTENT LAYOUT
   ================================ */

.profile-main-content {
    padding: var(--spacing-2xl) 0;
    margin-top: calc(-1 * var(--spacing-xl));
    position: relative;
    z-index: 3;
}

.profile-sidebar {
    position: sticky;
    top: var(--spacing-xl);
    height: fit-content;
}

/* ================================
   SIDEBAR COMPONENTS
   ================================ */

/* Quick Stats Card */
.quick-stats-card {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.quick-stats-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.quick-stats-card h6 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
}

.quick-stat:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.quick-stat:hover {
    background: var(--gray-50);
    border-radius: var(--radius);
    margin: 0 calc(-1 * var(--spacing-sm));
    padding: var(--spacing-md) var(--spacing-sm);
}

.quick-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.quick-stat-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.quick-stat-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.quick-stat-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.quick-stat-icon.info {
    background: var(--info-light);
    color: var(--info);
}

.quick-stat-info {
    flex: 1;
}

.quick-stat-value {
    font-size: var(--font-size-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: var(--spacing-xs);
}

.quick-stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: var(--font-medium);
}

/* Profile Details Card */
.profile-details-card {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.profile-details-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.profile-details-card h6 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--gray-100);
}

.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: var(--font-medium);
}

.detail-value {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    font-weight: var(--font-medium);
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.profile-actions {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--gray-200);
}

/* Quick Actions Card */
.quick-actions-card {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.quick-actions-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.quick-actions-card h6 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: var(--font-size-sm);
    font-weight: var(--font-medium);
}

.action-btn:hover {
    background: var(--primary-50);
    border-color: var(--primary-200);
    color: var(--primary-700);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.action-btn i {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-xs);
}

/* ================================
   NAVIGATION TABS
   ================================ */

.profile-nav-tabs {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.profile-nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tabs-wrapper {
    display: flex;
    gap: var(--spacing-sm);
    min-width: max-content;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: transparent;
    border: none;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}

.nav-tab:hover {
    background: var(--gray-50);
    color: var(--text-primary);
}

.nav-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.nav-tab.active:hover {
    background: var(--primary-600);
}

.nav-tab i {
    font-size: var(--font-size-base);
}

.tab-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: var(--font-size-xs);
    font-weight: var(--font-semibold);
    padding: 2px 6px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
}

.nav-tab:not(.active) .tab-badge {
    background: var(--gray-200);
    color: var(--text-secondary);
}

/* ================================
   TAB CONTENT
   ================================ */

.tab-content-wrapper {
    position: relative;
}

.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition-slow);
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.content-header {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
}

.content-header h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.content-header p {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin: 0;
}

.header-actions {
    margin-top: var(--spacing-md);
}

/* ================================
   BUTTON STYLES
   ================================ */

/* Base Button */
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-danger,
.btn-warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    font-weight: var(--font-medium);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    user-select: none;
}

/* Button Sizes */
.btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-xs);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: var(--font-size-lg);
}

.full-width {
    width: 100%;
}

/* Button Variants */
.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--text-primary);
    border-color: var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--gray-300);
}

.btn-outline:hover {
    background: var(--gray-50);
    color: var(--text-primary);
    border-color: var(--gray-400);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-warning {
    background: var(--warning);
    color: white;
    border-color: var(--warning);
}

.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Disabled State */
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-outline:disabled,
.btn-danger:disabled,
.btn-warning:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading State */
.btn-loading {
    position: relative;
    color: transparent;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ================================
   DASHBOARD CONTENT
   ================================ */

.dashboard-content {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
}

/* Section Styling */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h5 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin: 0;
}

.view-all-link {
    color: var(--primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-medium);
    text-decoration: none;
    transition: var(--transition);
}

.view-all-link:hover {
    color: var(--primary-700);
}

/* Recent Activity */
.recent-activity-section {
    margin-bottom: var(--spacing-2xl);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
    transition: var(--transition);
}

.activity-item:hover {
    background: var(--primary-50);
    border-color: var(--primary-200);
    transform: translateX(4px);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: var(--font-size-sm);
}

.activity-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.activity-icon.info {
    background: var(--info-light);
    color: var(--info);
}

.activity-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.activity-desc {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.activity-time {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: var(--font-medium);
}

/* Upcoming Events */
.upcoming-events-section {
    margin-bottom: var(--spacing-xl);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.event-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
}

.event-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-200);
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-sm);
    background: var(--primary-50);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius);
    min-width: 60px;
    flex-shrink: 0;
}

.event-day {
    font-size: var(--font-size-xl);
    font-weight: var(--font-bold);
    color: var(--primary-700);
    line-height: 1;
}

.event-month {
    font-size: var(--font-size-xs);
    font-weight: var(--font-semibold);
    color: var(--primary-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-content {
    flex: 1;
}

.event-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.event-time {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.event-location {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: var(--font-medium);
}

/* ================================
   FILTER TABS
   ================================ */

.filter-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-sm);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    user-select: none;
}

.filter-tab:hover {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--gray-200);
}

.filter-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-xs);
}

.filter-tab.active:hover {
    background: var(--primary-600);
    border-color: var(--primary-600);
}

/* ================================
   CONTENT SECTIONS
   ================================ */

.reservations-content,
.books-content,
.history-content,
.settings-content {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-lg);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.empty-state h4 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ================================
   RESERVATION CARDS
   ================================ */

.reservations-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.reservation-card {
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.reservation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gray-300);
    transition: var(--transition);
}

.reservation-card[data-status="confirmed"]::before {
    background: var(--success);
}

.reservation-card[data-status="pending"]::before {
    background: var(--warning);
}

.reservation-card[data-status="completed"]::before {
    background: var(--info);
}

.reservation-card[data-status="cancelled"]::before {
    background: var(--danger);
}

.reservation-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-200);
}

.reservation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.reservation-status {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reservation-status.confirmed {
    background: var(--success-light);
    color: var(--success);
}

.reservation-status.pending {
    background: var(--warning-light);
    color: var(--warning);
}

.reservation-status.completed {
    background: var(--info-light);
    color: var(--info);
}

.reservation-status.cancelled {
    background: var(--danger-light);
    color: var(--danger);
}

.reservation-id {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-weight: var(--font-medium);
}

.reservation-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.reservation-main {
    flex: 1;
}

.reservation-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.reservation-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.detail-item i {
    color: var(--text-muted);
    width: 16px;
    flex-shrink: 0;
}

.reservation-purpose {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-style: italic;
    padding: var(--spacing-sm);
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
}

.reservation-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--gray-200);
}

/* ================================
   BOOK CARDS - ENHANCED STYLING
   ================================ */

.books-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.book-card {
    display: flex;
    gap: var(--spacing-lg);
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.book-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--success);
    transition: var(--transition);
}

.book-card.overdue::before {
    background: var(--danger);
}

.book-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-300);
}

.book-card:hover::before {
    width: 8px;
}

.book-cover {
    position: relative;
    flex-shrink: 0;
    margin-right: var(--spacing-sm);
}

.book-cover img {
    width: 60px;
    height: 85px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.book-card:hover .book-cover img {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.book-status-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    padding: 2px var(--spacing-xs);
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 20px;
    height: 20px;
    justify-content: center;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--white);
}

.book-status-badge.active {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.book-status-badge.overdue {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

.book-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    min-height: 85px;
}

.book-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    line-height: var(--leading-tight);
    margin-bottom: var(--spacing-xs);
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.book-author {
    font-size: var(--font-size-sm);
    color: var(--primary-600);
    font-style: italic;
    font-weight: var(--font-medium);
    margin-bottom: var(--spacing-sm);
}

.book-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
    background: var(--gray-50);
    padding: var(--spacing-sm);
    border-radius: var(--radius);
    border: 1px solid var(--gray-100);
}

.book-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-sm);
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--gray-200);
}

.book-detail:last-child {
    border-bottom: none;
}

.book-detail .label {
    color: var(--text-secondary);
    font-weight: var(--font-semibold);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    margin-right: var(--spacing-sm);
}

.book-detail .value {
    color: var(--text-primary);
    font-weight: var(--font-semibold);
    text-align: right;
    flex: 1;
}

.book-detail .value.overdue {
    color: var(--danger);
    font-weight: var(--font-bold);
}

.book-detail.fine {
    background: var(--danger-light);
    padding: var(--spacing-xs);
    border-radius: var(--radius);
    margin: var(--spacing-xs) calc(-1 * var(--spacing-sm));
    border: 1px solid var(--danger);
    border-bottom: 2px solid var(--danger);
}

.book-detail.fine .label,
.book-detail.fine .value {
    color: var(--danger);
    font-weight: var(--font-bold);
}

.book-actions {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--gray-200);
}

.book-actions .btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-semibold);
    border-radius: var(--radius);
    transition: all var(--transition);
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
}

.book-actions .btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.book-actions .btn-sm::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.6s ease;
}

.book-actions .btn-sm:hover::before {
    left: 100%;
}

/* Specific button variants for book actions */
.book-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-600));
    border: none;
}

.book-actions .btn-secondary {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    border: 1px solid var(--gray-300);
    color: var(--text-primary);
}

.book-actions .btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    border: none;
}

/* Book card status indicators */
.book-card[data-status="active"] {
    border-left: 5px solid var(--success);
}

.book-card[data-status="overdue"] {
    border-left: 5px solid var(--danger);
    background: linear-gradient(135deg, var(--surface) 0%, var(--danger-light) 100%);
}

.book-card[data-status="due-soon"] {
    border-left: 5px solid var(--warning);
    background: linear-gradient(135deg, var(--surface) 0%, var(--warning-light) 100%);
}

/* Enhanced empty state for books */
.books-content .empty-state {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--primary-50) 100%);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: var(--spacing-3xl);
    margin: var(--spacing-xl) 0;
}

.books-content .empty-state i {
    font-size: 5rem;
    color: var(--primary-300);
    margin-bottom: var(--spacing-xl);
}

.books-content .empty-state h4 {
    color: var(--text-primary);
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-md);
}

.books-content .empty-state p {
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-xl);
    max-width: 500px;
}

/* Book card loading animation */
@keyframes bookCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.book-card {
    animation: bookCardSlideIn 0.5s ease-out;
}

/* Book cover shimmer effect on hover */
.book-cover::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.8s ease;
    border-radius: var(--radius-md);
}

.book-card:hover .book-cover::after {
    left: 100%;
}

/* Enhanced book info layout */
.book-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.book-isbn {
    font-family: 'Courier New', monospace;
    font-size: var(--font-size-xs);
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: var(--radius);
    color: var(--text-muted);
}

/* Renewal indicator */
.renewal-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

.renewal-dots {
    display: flex;
    gap: 2px;
}

.renewal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gray-300);
}

.renewal-dot.used {
    background: var(--primary);
}

/* Due date highlighting */
.due-soon {
    position: relative;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

/* ================================
   HISTORY SECTION
   ================================ */

.history-filters {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.filter-select,
.filter-date {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    background: var(--surface);
    transition: var(--transition);
    min-width: 160px;
}

.filter-select:focus,
.filter-date:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.history-timeline {
    position: relative;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    position: relative;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-date {
    flex-shrink: 0;
    width: 80px;
    font-size: var(--font-size-sm);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    text-align: right;
    padding-top: var(--spacing-sm);
}

.timeline-content {
    flex: 1;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--spacing-lg) - 6px);
    top: 24px;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border: 3px solid var(--surface);
    border-radius: var(--radius-full);
    z-index: 1;
}

.timeline-event {
    display: flex;
    gap: var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
}

.timeline-event:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.event-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.event-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.event-icon.info {
    background: var(--info-light);
    color: var(--info);
}

.event-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.event-icon.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.event-details {
    flex: 1;
}

.event-details h5 {
    font-size: var(--font-size-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.event-details p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: var(--leading-normal);
}

.event-time {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    font-weight: var(--font-medium);
}

/* ================================
   SETTINGS SECTION
   ================================ */

.settings-sections {
    margin-bottom: var(--spacing-2xl);
}

.settings-section {
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--gray-200);
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.settings-section h5 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    transition: var(--transition);
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item:hover {
    background: var(--primary-50);
    border-color: var(--primary-200);
}

.setting-info {
    flex: 1;
    margin-right: var(--spacing-lg);
}

.setting-info h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.setting-info p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: var(--leading-normal);
}

.setting-control {
    flex-shrink: 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: var(--radius-full);
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

input:checked + .slider {
    background: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Form Elements */
.form-select {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    background: var(--surface);
    transition: var(--transition);
    min-width: 180px;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-100);
}

.settings-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--gray-200);
}

/* ================================
   MODAL STYLES
   ================================ */

.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-lg);
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-lg) var(--spacing-xl);
}

.btn-close {
    background: none;
    border: none;
    font-size: var(--font-size-lg);
    opacity: 0.6;
    transition: var(--transition);
}

.btn-close:hover {
    opacity: 1;
}

/* Reservation Details Modal */
.reservation-details-modal {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--gray-200);
}

.detail-header h4 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin: 0;
}

.status-badge {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
}

.status-badge.confirmed {
    background: var(--success-light);
    color: var(--success);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.detail-section {
    background: var(--gray-50);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
}

.detail-section h6 {
    font-size: var(--font-size-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-section .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--gray-200);
}

.detail-section .detail-row:last-child {
    border-bottom: none;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

/* Large Screens (1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
    
    .profile-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Medium Screens (992px to 1199px) */
@media (max-width: 1199px) {
    .profile-header {
        padding: var(--spacing-xl) 0;
    }
    
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .profile-sidebar {
        position: static;
        margin-bottom: var(--spacing-lg);
    }
    
    .action-buttons {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Small Screens (768px to 991px) */
@media (max-width: 991px) {
    .profile-header {
        padding: var(--spacing-lg) 0;
    }
    
    .profile-hero-card {
        padding: var(--spacing-lg);
    }
    
    .profile-name {
        font-size: var(--font-size-2xl);
    }
    
    .profile-avatar-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .profile-avatar-large {
        width: 100px;
        height: 100px;
    }
    
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
        margin-top: var(--spacing-lg);
    }
    
    .stat-item {
        padding: var(--spacing-sm);
    }
    
    .stat-value {
        font-size: var(--font-size-xl);
    }
    
    .nav-tabs-wrapper {
        overflow-x: auto;
        padding-bottom: var(--spacing-xs);
    }
    
    .filter-tabs {
        overflow-x: auto;
        padding-bottom: var(--spacing-xs);
    }
    
    .reservations-content,
    .books-content,
    .history-content,
    .settings-content {
        padding: var(--spacing-lg);
    }
    
    .reservation-details {
        grid-template-columns: 1fr;
    }
    
    .book-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--spacing-md);
        padding: var(--spacing-lg);
    }
    
    .book-cover {
        margin-bottom: 0;
        margin-right: 0;
        align-self: center;
    }
    
    .book-cover img {
        width: 80px;
        height: 110px;
    }
    
    .book-info {
        width: 100%;
        text-align: left;
    }
    
    .book-details {
        grid-template-columns: 1fr;
        margin: var(--spacing-sm) 0;
    }
    
    .book-title {
        text-align: center;
        font-size: var(--font-size-base);
    }
    
    .book-author {
        text-align: center;
    }
    
    .book-actions {
        justify-content: center;
        flex-direction: row;
        gap: var(--spacing-xs);
    }
    
    .book-actions .btn-sm {
        flex: 1;
        min-width: 80px;
    }
    
    .book-details {
        grid-template-columns: 1fr;
    }
    
    .timeline-item {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .timeline-date {
        width: auto;
        text-align: left;
        font-size: var(--font-size-xs);
        padding-top: 0;
    }
    
    .timeline-content::before {
        display: none;
    }
    
    .history-timeline::before {
        display: none;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }
    
    .setting-info {
        margin-right: 0;
    }
    
    .settings-actions {
        flex-direction: column;
    }
}

/* Extra Small Screens (576px to 767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .profile-header {
        padding: var(--spacing-md) 0;
    }
    
    .profile-hero-card {
        padding: var(--spacing-md);
        margin: 0 var(--spacing-sm);
    }
    
    .profile-info-section {
        padding-top: var(--spacing-lg);
    }
    
    .profile-name {
        font-size: var(--font-size-xl);
    }
    
    .profile-id {
        font-size: var(--font-size-base);
    }
    
    .profile-avatar-large {
        width: 80px;
        height: 80px;
    }
    
    .profile-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xs);
    }
    
    .stat-item {
        padding: var(--spacing-sm);
    }
    
    .stat-value {
        font-size: var(--font-size-lg);
    }
    
    .stat-label {
        font-size: var(--font-size-xs);
    }
    
    .profile-nav-tabs {
        padding: var(--spacing-xs);
        margin: 0 var(--spacing-sm) var(--spacing-lg);
    }
    
    .nav-tab {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-xs);
    }
    
    .nav-tab span:not(.tab-badge) {
        display: none;
    }
    
    .quick-stats-card,
    .profile-details-card,
    .quick-actions-card {
        margin: 0 var(--spacing-sm) var(--spacing-md);
        padding: var(--spacing-md);
    }
    
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reservations-content,
    .books-content,
    .history-content,
    .settings-content {
        padding: var(--spacing-md);
        margin: 0 var(--spacing-sm);
    }
    
    .content-header {
        margin-bottom: var(--spacing-lg);
        padding-bottom: var(--spacing-md);
    }
    
    .content-header h3 {
        font-size: var(--font-size-xl);
    }
    
    .header-actions {
        margin-top: var(--spacing-sm);
    }
    
    .filter-tabs {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .filter-tab {
        text-align: center;
    }
    
    .reservation-card,
    .book-card {
        padding: var(--spacing-md);
    }
    
    .reservation-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-xs);
    }
    
    .reservation-actions {
        flex-direction: column;
    }
    
    .book-card {
        gap: var(--spacing-sm);
        padding: var(--spacing-md);
        flex-direction: column;
    }
    
    .book-cover {
        align-self: center;
        margin-right: 0;
    }
    
    .book-cover img {
        width: 60px;
        height: 85px;
    }
    
    .book-info {
        text-align: center;
    }
    
    .book-title {
        font-size: var(--font-size-sm);
    }
    
    .book-details {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    .book-actions {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .book-actions .btn-sm {
        width: 100%;
        justify-content: center;
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 10px;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .activity-item {
        padding: var(--spacing-sm);
    }
    
    .timeline-event {
        flex-direction: column;
        gap: var(--spacing-sm);
        padding: var(--spacing-md);
    }
    
    .history-filters {
        flex-direction: column;
    }
    
    .filter-select,
    .filter-date {
        min-width: auto;
        width: 100%;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Ultra Small Screens (below 576px) */
@media (max-width: 575px) {
    .profile-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .empty-state {
        padding: var(--spacing-xl) var(--spacing-sm);
    }
    
    .empty-state i {
        font-size: 3rem;
    }
    
    .empty-state h4 {
        font-size: var(--font-size-lg);
    }
}

/* ================================
   ANIMATIONS & TRANSITIONS
   ================================ */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply animations */
.profile-hero-card {
    animation: fadeIn 0.6s ease-out;
}

.quick-stats-card,
.profile-details-card,
.quick-actions-card {
    animation: slideIn 0.4s ease-out;
}

.reservation-card,
.book-card {
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    animation: fadeIn 0.4s ease-out;
}

/* ================================
   UTILITY CLASSES
   ================================ */

/* Spacing Utilities */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--spacing-xs) !important; }
.mt-2 { margin-top: var(--spacing-sm) !important; }
.mt-3 { margin-top: var(--spacing-md) !important; }
.mt-4 { margin-top: var(--spacing-lg) !important; }
.mt-5 { margin-top: var(--spacing-xl) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--spacing-xs) !important; }
.mb-2 { margin-bottom: var(--spacing-sm) !important; }
.mb-3 { margin-bottom: var(--spacing-md) !important; }
.mb-4 { margin-bottom: var(--spacing-lg) !important; }
.mb-5 { margin-bottom: var(--spacing-xl) !important; }

/* Text Utilities */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }

/* Display Utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* Flexbox Utilities */
.justify-content-start { justify-content: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }

/* Background Utilities */
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--gray-100) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-danger { background-color: var(--danger) !important; }

/* Border Utilities */
.border { border: 1px solid var(--gray-200) !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid var(--gray-200) !important; }
.border-bottom { border-bottom: 1px solid var(--gray-200) !important; }

.rounded { border-radius: var(--radius) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* Shadow Utilities */
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* ================================
   PRINT STYLES
   ================================ */

@media print {
    .profile-page {
        background: white !important;
        color: black !important;
    }
    
    .profile-header {
        background: var(--gray-100) !important;
        color: black !important;
        page-break-inside: avoid;
    }
    
    .profile-hero-card {
        border: 1px solid var(--gray-300) !important;
        box-shadow: none !important;
        background: white !important;
    }
    
    .profile-nav-tabs,
    .filter-tabs,
    .reservation-actions,
    .book-actions,
    .settings-actions,
    .header-actions {
        display: none !important;
    }
    
    .tab-content {
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .reservation-card,
    .book-card,
    .quick-stats-card,
    .profile-details-card {
        border: 1px solid var(--gray-300) !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        margin-bottom: var(--spacing-md) !important;
    }
    
    .timeline-item {
        page-break-inside: avoid;
    }
}
