/* Base Layout & Background */
body { 
    background-color: #f1f5f9; /* Slate-100 base */
    /* Preserved Mesh Gradient from Code A (Subtle) */
    background-image: 
        radial-gradient(at 0% 0%, rgba(52, 211, 153, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(167, 243, 208, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
}

/* CODE B Layout Components (Adapted to Green Theme) */

/* Main Card Styling - High Definition */
.ink-card {
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* Stronger Shadow */
    border: 1px solid #cbd5e1; /* Slate-300 Border */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

/* Modern Input Fields - High Contrast */
.modern-input {
    border: 2px solid #94a3b8; /* Slate-400 for high visibility */
    transition: all 0.2s ease-in-out;
}
.modern-input:focus {
    border-color: #10b981; /* Primary-500 */
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15); /* Green Glow */
    background-color: white;
}

/* Modern Tab System */
.modern-tab-container {
    /* No container background needed for separate buttons */
}

.modern-tab-btn {
    position: relative;
    transition: all 0.2s ease;
    border: 1px solid #cbd5e1; /* Default border for inactive */
    color: #64748b; /* Slate-500 for inactive */
    background-color: white;
}

.modern-tab-btn:hover {
    background-color: #f8fafc;
    color: #334155;
    border-color: #94a3b8;
}

/* Active Tab - Solid Banana Green */
.modern-tab-btn.active-tab {
    background-color: #10b981; /* Primary-500 */
    color: white;
    border-color: #10b981;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3); /* Green Shadow */
}

.modern-tab-btn.active-tab:hover {
    background-color: #059669; /* Primary-600 */
    border-color: #059669;
}

/* --- ACTION BUTTONS --- */

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    cursor: pointer;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Button 1: Excel (Green) */
.action-btn-excel {
    background-color: #ecfdf5; /* emerald-50 */
    color: #059669; /* emerald-600 */
    border-color: #a7f3d0; /* emerald-200 */
}
.action-btn-excel:hover {
    background-color: #10b981; /* emerald-500 */
    color: white;
    border-color: #10b981;
}

/* Button 2: Edit (Blue) */
.action-btn-edit {
    background-color: #eff6ff; /* blue-50 */
    color: #2563eb; /* blue-600 */
    border-color: #bfdbfe; /* blue-200 */
}
.action-btn-edit:hover {
    background-color: #3b82f6; /* blue-500 */
    color: white;
    border-color: #3b82f6;
}

/* Button 3: Delete (Red) */
.action-btn-delete {
    background-color: #fef2f2; /* red-50 */
    color: #dc2626; /* red-600 */
    border-color: #fecaca; /* red-200 */
}
.action-btn-delete:hover {
    background-color: #ef4444; /* red-500 */
    color: white;
    border-color: #ef4444;
}

/* Button 4: Print (Gray) */
.action-btn-print {
    background-color: #f8fafc; /* slate-50 */
    color: #475569; /* slate-600 */
    border-color: #e2e8f0; /* slate-200 */
}
.action-btn-print:hover {
    background-color: #64748b; /* slate-500 */
    color: white;
    border-color: #64748b;
}

/* Commune Style for Book Info Column */
.commune-style {
    font-weight: bold;
    color: #d35400; /* Deep Orange/Rust color */
}

/* Success Popup Style */
.copy-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.85); /* Semi-transparent Black */
    color: white;
    padding: 16px 32px;
    border-radius: 12px;
    font-family: 'Kantumruy Pro', sans-serif;
    font-weight: bold;
    font-size: 1.1rem;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
}

.copy-popup.show {
    opacity: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; border: 2px solid #f1f5f9; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Utilities */
.cursor-wait {
    cursor: wait;
}

/* Animation Utilities */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}