@import 'tailwindcss';

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../../resources/views/**/*.blade.php';

@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300;14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&display=swap');

@theme {
    --font-sans: 'Inter', 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
    
    --color-primary: #3b82f6;
    --color-primary-dark: #2563eb;
    --color-primary-light: #60a5fa;
    --color-secondary: #64748b;
    --color-success: #10b981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #06b6d4;
    
    --breakpoint-xs: 375px;
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
}

@layer base {
    * {
        font-family: 'Inter', sans-serif;
    }
    
    html {
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: transparent;
        scroll-behavior: smooth;
    }
    
    body {
        background-color: #ffffff;
        color: #1e293b;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Custom scrollbar */
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    ::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }
    
    ::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 10px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }
    
    /* Selection color */
    ::selection {
        background-color: var(--color-primary);
        color: white;
    }
}

@layer components {
    /* Modern Buttons */
    .btn-primary {
        background-color: var(--color-primary);
        color: white;
        padding: 0.5rem 1.25rem;
        border-radius: 0.5rem;
        font-weight: 600;
        font-size: 0.875rem;
        transition: all 0.2s ease;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }
    .btn-primary:hover {
        background-color: var(--color-primary-dark);
        transform: translateY(-1px);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .btn-outline {
        border: 2px solid var(--color-primary);
        color: var(--color-primary);
        padding: 0.5rem 1.25rem;
        border-radius: 0.5rem;
        font-weight: 600;
        font-size: 0.875rem;
        transition: all 0.2s ease;
        background: transparent;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
    }
    .btn-outline:hover {
        background-color: var(--color-primary);
        color: white;
    }
    
    .btn-ghost {
        color: var(--color-secondary);
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        font-weight: 500;
        font-size: 0.875rem;
        transition: all 0.2s ease;
    }
    .btn-ghost:hover {
        background-color: #f3f4f6;
    }
    
    /* Modern Cards */
    .card-modern {
        background-color: white;
        border-radius: 1rem;
        border: 1px solid #f3f4f6;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
    }
    .card-modern:hover {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
    }
    
    /* Modern Inputs */
    .input-modern {
        width: 100%;
        padding: 0.5rem 0.75rem;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        font-size: 0.875rem;
        transition: all 0.2s ease;
        background-color: #f9fafb;
    }
    .input-modern:focus {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        background-color: white;
    }
    
    /* Modern Select */
    .select-modern {
        width: 100%;
        padding: 0.5rem 0.75rem;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        font-size: 0.875rem;
        transition: all 0.2s ease;
        background-color: #f9fafb;
    }
    .select-modern:focus {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    /* Textarea Modern */
    .textarea-modern {
        width: 100%;
        padding: 0.5rem 0.75rem;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        font-size: 0.875rem;
        transition: all 0.2s ease;
        background-color: #f9fafb;
        resize: vertical;
    }
    .textarea-modern:focus {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        background-color: white;
    }
    
    /* Badge Modern */
    .badge-modern {
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        padding: 0.25rem 0.625rem;
        border-radius: 9999px;
        font-size: 0.75rem;
        font-weight: 500;
    }
    
    .badge-success {
        background-color: rgba(16, 185, 129, 0.1);
        color: var(--color-success);
    }
    
    .badge-warning {
        background-color: rgba(245, 158, 11, 0.1);
        color: var(--color-warning);
    }
    
    .badge-danger {
        background-color: rgba(239, 68, 68, 0.1);
        color: var(--color-danger);
    }
    
    .badge-info {
        background-color: rgba(6, 182, 212, 0.1);
        color: var(--color-info);
    }
    
    .badge-primary {
        background-color: rgba(59, 130, 246, 0.1);
        color: var(--color-primary);
    }
    
    /* Alert */
    .alert {
        padding: 1rem;
        border-radius: 0.5rem;
        margin-bottom: 1rem;
    }
    .alert-success {
        background-color: rgba(16, 185, 129, 0.1);
        border: 1px solid rgba(16, 185, 129, 0.2);
        color: var(--color-success);
    }
    .alert-danger {
        background-color: rgba(239, 68, 68, 0.1);
        border: 1px solid rgba(239, 68, 68, 0.2);
        color: var(--color-danger);
    }
    .alert-warning {
        background-color: rgba(245, 158, 11, 0.1);
        border: 1px solid rgba(245, 158, 11, 0.2);
        color: var(--color-warning);
    }
    .alert-info {
        background-color: rgba(6, 182, 212, 0.1);
        border: 1px solid rgba(6, 182, 212, 0.2);
        color: var(--color-info);
    }
    
    /* Table Modern */
    .table-modern {
        min-width: 100%;
        border-collapse: collapse;
    }
    .table-modern th {
        padding: 0.75rem 1.5rem;
        text-align: left;
        font-size: 0.75rem;
        font-weight: 600;
        color: var(--color-secondary);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        background-color: #f9fafb;
        border-bottom: 1px solid #e5e7eb;
    }
    .table-modern td {
        padding: 1rem 1.5rem;
        font-size: 0.875rem;
        color: #1e293b;
        border-bottom: 1px solid #f3f4f6;
    }
    .table-modern tr:hover td {
        background-color: #f9fafb;
    }
    
    /* Pagination */
    .pagination {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        margin-top: 2rem;
    }
    .pagination-link {
        padding: 0.375rem 0.75rem;
        border-radius: 0.375rem;
        color: #4b5563;
        transition: all 0.2s;
    }
    .pagination-link:hover {
        background-color: #f3f4f6;
    }
    .pagination-active {
        background-color: var(--color-primary);
        color: white;
    }
    .pagination-active:hover {
        background-color: var(--color-primary-dark);
    }
    
    /* Modal */
    .modal-overlay {
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 50;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .modal-container {
        background-color: white;
        border-radius: 0.75rem;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
        max-width: 28rem;
        width: 90%;
        margin: 1rem;
    }
    .modal-header {
        padding: 1rem 1.25rem;
        border-bottom: 1px solid #f3f4f6;
    }
    .modal-body {
        padding: 1.25rem;
    }
    .modal-footer {
        padding: 1rem 1.25rem;
        border-top: 1px solid #f3f4f6;
        display: flex;
        justify-content: flex-end;
        gap: 0.75rem;
    }
    
    /* Hero Section */
    .hero-section {
        position: relative;
        overflow: hidden;
        background: linear-gradient(135deg, #eff6ff 0%, #ffffff 50%, #f3e8ff 100%);
    }
    
    /* Search Box */
    .search-box-modern {
        background-color: white;
        border-radius: 0.75rem;
        padding: 1.25rem;
        border: 1px solid #f3f4f6;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    }
    
    /* Book Card Modern */
    .book-card-modern {
        background-color: white;
        border-radius: 0.5rem;
        overflow: hidden;
        border: 1px solid #f3f4f6;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
    }
    .book-card-modern:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }
    
    /* Dashboard Card */
    .stat-card {
        background-color: white;
        border-radius: 0.75rem;
        padding: 1.5rem;
        border: 1px solid #f3f4f6;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        transition: all 0.2s ease;
    }
    .stat-card:hover {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }
    
    /* Container Custom */
    .container-custom {
        max-width: 80rem;
        margin-left: auto;
        margin-right: auto;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    @media (min-width: 640px) {
        .container-custom {
            padding-left: 1.5rem;
            padding-right: 1.5rem;
        }
    }
    @media (min-width: 1024px) {
        .container-custom {
            padding-left: 2rem;
            padding-right: 2rem;
        }
    }
    
    /* Loading Spinner */
    .spinner {
        display: inline-block;
        width: 1rem;
        height: 1rem;
        border: 2px solid #e5e7eb;
        border-top-color: var(--color-primary);
        border-radius: 50%;
        animation: spin 0.6s linear infinite;
    }
    
    /* Divider */
    .divider {
        border-top: 1px solid #f3f4f6;
        margin: 1rem 0;
    }
}

@layer utilities {
    /* Text truncation */
    .line-clamp-1 {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .line-clamp-2 {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .line-clamp-3 {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Text gradient */
    .text-gradient {
        background: linear-gradient(135deg, var(--color-primary), #8b5cf6);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
    
    /* Scrollbar hide */
    .scrollbar-hide {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .scrollbar-hide::-webkit-scrollbar {
        display: none;
    }
    
    /* Glass effect */
    .glass-effect {
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    /* Animation */
    .animate-fade-in {
        animation: fadeIn 0.3s ease-in-out;
    }
    
    .animate-slide-up {
        animation: slideUp 0.3s ease-out;
    }
    
    .animate-pulse-slow {
        animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }
}

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

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

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

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .btn-primary, .btn-outline, .btn-ghost {
        border: 1px solid black;
        background: transparent;
        color: black;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Tambahkan dark mode styles jika diperlukan nanti */
}