/* Premium Full Design System - Complete */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Main Content Area */
main {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    min-height: 100vh;
    padding: 2rem;
}

/* Premium Glass Cards */
.bg-white, .card, [class*="bg-white"] {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.bg-white *, .card *, [class*="bg-white"] * {
    color: #1a1f36 !important;
}

.bg-white h1, .bg-white h2, .bg-white h3, .bg-white h4, .bg-white h5,
.card h1, .card h2, .card h3, .card h4, .card h5 {
    color: #0f172a !important;
    font-weight: 700 !important;
}

.bg-white:hover, .card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2) !important;
}

/* Page Headers with Gradient */
.bg-gradient-to-r, .bg-gradient-to-r * {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 20px !important;
    padding: 2rem !important;
    color: white !important;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3) !important;
    margin-bottom: 2rem !important;
}

.bg-gradient-to-r h1, .bg-gradient-to-r h2, .bg-gradient-to-r h3, 
.bg-gradient-to-r h4, .bg-gradient-to-r h5, .bg-gradient-to-r p,
.bg-gradient-to-r span, .bg-gradient-to-r div {
    color: white !important;
}

/* Premium Buttons */
.btn, button:not(.close), [class*="bg-blue"], [class*="bg-amber"], [class*="bg-green"], [class*="bg-purple"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 0.875rem 1.75rem !important;
    border-radius: 12px !important;
    border: none !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
    position: relative;
    overflow: hidden;
}

.btn *, button * {
    color: white !important;
}

.btn:hover, button:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6) !important;
}

.btn::before, button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before, button:hover::before {
    left: 100%;
}

/* User request: remove the decorative strip and make the premium buttons occupy
   the top-strip space (use --top-strip-height to adjust). */
.btn, button:not(.close), [class*="bg-blue"], [class*="bg-amber"], [class*="bg-green"], [class*="bg-purple"] {
    --top-strip-height: 56px; /* adjust if you want a different height */
}

/* Disable the sheen/strip pseudo-element */
.btn::before, button::before {
    display: none !important;
}

/* Keep buttons' original inline/block behavior but remove sheen; ensure padding and border-radius remain reasonable */
.btn, button:not(.close), [class*="bg-blue"], [class*="bg-amber"], [class*="bg-green"], [class*="bg-purple"] {
    /* restore natural display and sizing */
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    padding: 0.875rem 1.75rem !important;
    line-height: normal !important;
    text-align: center !important;
    border-radius: 12px !important;
}

/* Remove the top strip element (global page header) per request */
/* removed global hide for .bg-gradient-to-r to avoid hiding elements that use this utility class */

/* Premium Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.75rem;
    background: transparent !important;
}

table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

table thead th {
    padding: 1.5rem !important;
    color: white !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
}

table thead th:first-child {
    border-radius: 16px 0 0 16px !important;
}

table thead th:last-child {
    border-radius: 0 16px 16px 0 !important;
}

table tbody tr {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

table tbody tr td, table tbody tr td * {
    color: #1a1f36 !important;
}

table tbody tr:hover {
    transform: scale(1.02) translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2) !important;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%) !important;
}

table tbody td {
    padding: 1.5rem !important;
    border: none !important;
}

table tbody tr td:first-child {
    border-radius: 16px 0 0 16px !important;
}

table tbody tr td:last-child {
    border-radius: 0 16px 16px 0 !important;
}

/* Premium Inputs */
input, select, textarea {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid rgba(102, 126, 234, 0.2) !important;
    border-radius: 12px !important;
    padding: 1rem 1.5rem !important;
    transition: all 0.3s ease !important;
    font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1) !important;
    transform: translateY(-2px);
    background: white !important;
}

/* Premium Badges */
.badge, [class*="badge-"], span[class*="bg-green"], span[class*="bg-red"], span[class*="bg-yellow"] {
    padding: 0.5rem 1.25rem !important;
    border-radius: 20px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    display: inline-block;
}

.badge-success, [class*="bg-green-"] {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
    color: white !important;
}

.badge-warning, [class*="bg-yellow-"] {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    color: white !important;
}

.badge-danger, [class*="bg-red-"] {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%) !important;
    color: white !important;
}

/* Stats Cards */
.stat-card, [class*="p-6 rounded"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 20px !important;
    padding: 2rem !important;
    color: white !important;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3) !important;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.stat-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 0 25px 50px rgba(102, 126, 234, 0.4) !important;
}

/* Form Groups */
.form-group, .mb-4, .mb-6 {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1a1f36;
    font-size: 0.95rem;
}

/* Alerts */
.alert, [class*="bg-green-50"], [class*="bg-red-50"], [class*="bg-yellow-50"] {
    padding: 1.25rem !important;
    border-radius: 16px !important;
    border-left: 4px solid !important;
    backdrop-filter: blur(10px);
    margin-bottom: 1.5rem;
}

/* Links */
a {
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

a:hover {
    color: #764ba2;
    transform: translateX(2px);
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination a, .pagination span {
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
}

/* Modals */
.modal-content {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    border-radius: 24px !important;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-radius: 24px 24px 0 0 !important;
    padding: 1.5rem 2rem !important;
}

/* Dropdowns */
.dropdown-menu {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    border-radius: 16px !important;
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: 12px !important;
    padding: 0.75rem 1.25rem !important;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%) !important;
    transform: translateX(5px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Loading Spinner */
.spinner-border {
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 768px) {
    main {
        padding: 1rem;
    }
    
    .bg-white, .card {
        border-radius: 16px !important;
    }
    
    table thead th, table tbody td {
        padding: 1rem !important;
    }
}