/* 
 * CERTROVI - High-End Design System
 */

@import "tailwindcss";

@theme {
  --font-sans: "Poppins", ui-sans-serif, system-ui, sans-serif;
  --color-primary: #0bb864;
  --color-primary-dark: #099e54;
  --color-primary-light: #e6f9ef;
  --radius-xl: 18px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
}

:root {
    --primary-green: #0bb864;
    --primary-green-dark: #099e54;
    --primary-green-light: #e6f9ef;
    --bg-off-white: #f8faf9;
    --border-color: rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

body {
    background-color: var(--bg-off-white);
    -webkit-font-smoothing: antialiased;
}

/* Premium Card (Bento Style) */
.card {
    background: #ffffff;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.06);
    border-color: rgba(11, 184, 100, 0.1);
}

/* Modern Data Table */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    text-align: left;
    padding: 1.25rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #9ca3af;
    background: #ffffff;
}

.data-table td {
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    vertical-align: middle;
}

.data-table tr:last-child td:first-child { border-bottom-left-radius: var(--radius-2xl); }
.data-table tr:last-child td:last-child { border-bottom-right-radius: var(--radius-2xl); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--primary-green);
    color: #ffffff;
    box-shadow: 0 8px 20px -6px rgba(11, 184, 100, 0.4);
}

.btn-primary:hover {
    background: var(--primary-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 25px -5px rgba(11, 184, 100, 0.5);
}

/* Form Inputs */
.input-field {
    height: 52px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 0 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    outline: none;
}

.input-field:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px var(--primary-green-light);
}

/* Attendance Grid Switch */
.attendance-switch {
    width: 44px;
    height: 24px;
    position: relative;
    display: inline-block;
}

.attendance-switch input { opacity: 0; width: 0; height: 0; }

.attendance-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e5e7eb;
    border-radius: 24px;
    transition: 0.3s;
}

.attendance-slider:before {
    position: absolute;
    content: "";
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input:checked + .attendance-slider { background-color: var(--primary-green); }
input:checked + .attendance-slider:before { transform: translateX(20px); }

/* Badges */
.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success { background: var(--primary-green-light); color: var(--primary-green-dark); }
.badge-error { background: #fee2e2; color: #991b1b; }

/* Dashboard Sidebar Item */
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 14px;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-item:hover {
    background: #f3f4f6;
    color: #1a1a1a;
}

.nav-item.active {
    background: var(--primary-green-light);
    color: var(--primary-green);
}

/* Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.animate-shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #d1d5db; }
