/*
 * CSS lokal untuk Mawar Online -- menggantikan Tailwind Play CDN.
 * Sengaja tidak pakai CDN/build tool supaya halaman tetap cepat &
 * tetap tampil normal walau laptop sedang offline.
 * Cuma berisi utility class yang benar-benar dipakai di resources/views.
 */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; }

a { color: inherit; text-decoration: none; }

table { border-collapse: collapse; }

/* Layout */
.flex { display: flex; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.block { display: block; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.self-center { align-self: center; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.whitespace-nowrap { white-space: nowrap; }
.list-disc { list-style-type: disc; }
.list-inside { list-style-position: inside; }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.space-x-2 > * + * { margin-left: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* Sizing */
.w-full { width: 100%; }
.w-24 { width: 6rem; }
.w-28 { width: 7rem; }
.min-w-\[220px\] { min-width: 220px; }
.max-w-6xl { max-width: 72rem; }
.max-w-lg { max-width: 32rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.h-12 { height: 3rem; }

/* Spacing */
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.pt-2 { padding-top: 0.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-5 { margin-top: 1.25rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* Borders & radius */
.border { border: 1px solid #e2e8f0; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-300 { border-color: #cbd5e1; }
.border-amber-200 { border-color: #fde68a; }
.border-emerald-200 { border-color: #a7f3d0; }
.border-red-200 { border-color: #fecaca; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }

.divide-y > * + * { border-top: 1px solid; }
.divide-slate-100 > * + * { border-color: #f1f5f9; }

/* Colors */
.bg-white { background-color: #fff; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-900 { background-color: #0f172a; }
.bg-primary { background-color: #4f46e5; }
.bg-primary-50 { background-color: #eef2ff; }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-100 { background-color: #d1fae5; }
.bg-amber-50 { background-color: #fffbeb; }
.bg-red-50 { background-color: #fef2f2; }
.bg-red-100 { background-color: #fee2e2; }

.text-white { color: #fff; }
.text-slate-200 { color: #e2e8f0; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-slate-900 { color: #0f172a; }
.text-emerald-700 { color: #047857; }
.text-amber-600 { color: #d97706; }
.text-amber-700 { color: #b45309; }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-red-700 { color: #b91c1c; }
.text-primary { color: #4f46e5; }
.text-primary-700 { color: #4338ca; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.025em; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.cursor-pointer { cursor: pointer; }

/* Interactive states */
.hover\:bg-slate-50:hover { background-color: #f8fafc; }
.hover\:bg-slate-700:hover { background-color: #334155; }
.hover\:bg-primary-dark:hover { background-color: #4338ca; }
.hover\:text-white:hover { color: #fff; }
.hover\:text-slate-900:hover { color: #0f172a; }
.hover\:text-red-700:hover { color: #b91c1c; }
.hover\:underline:hover { text-decoration: underline; }
.hover\:border-slate-400:hover { border-color: #94a3b8; }

.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px #94a3b8; }
.focus\:ring-slate-400:focus { box-shadow: 0 0 0 2px #94a3b8; }

/* Responsive (sm breakpoint, sama seperti Tailwind default: 640px) */
@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Elemen dasar form supaya konsisten walau browser beda-beda */
input, select, button {
    font-family: inherit;
    font-size: inherit;
}

/* Kartu statistik dashboard (gradient warna-warni) */
.stat-card {
    border-radius: 0.9rem;
    padding: 1.1rem 1.25rem;
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(15,23,42,0.25);
}
.stat-card-indigo { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.stat-card-emerald { background: linear-gradient(135deg, #059669, #0d9488); }
.stat-card-amber { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; margin: 0 0 0.3rem; }
.stat-value { font-size: 1.4rem; font-weight: 700; margin: 0; line-height: 1.2; }
.stat-sub { font-size: 0.72rem; margin-top: 0.3rem; opacity: 0.9; }

/* Kartu menu navigasi dashboard */
.nav-card {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.1rem 1.2rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.nav-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -12px rgba(79,70,229,0.35);
    border-color: #c7d2fe;
}
.nav-card-icon {
    width: 2.75rem; height: 2.75rem; border-radius: 0.75rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.nav-card-icon svg { width: 1.35rem; height: 1.35rem; }
.nav-card-title { font-weight: 600; color: #0f172a; margin: 0 0 0.2rem; font-size: 0.95rem; }
.nav-card-desc { font-size: 0.82rem; color: #64748b; margin: 0; line-height: 1.4; }

.nav-icon-indigo { background: #e0e7ff; color: #4338ca; }
.nav-icon-emerald { background: #d1fae5; color: #047857; }
.nav-icon-amber { background: #fef3c7; color: #b45309; }
.nav-icon-rose { background: #ffe4e6; color: #be123c; }
.nav-icon-sky { background: #e0f2fe; color: #0369a1; }
.nav-icon-violet { background: #ede9fe; color: #6d28d9; }

/* Tombol & elemen halaman Absensi */
.absensi-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}
.absensi-btn-masuk { background-color: #059669; color: #fff; }
.absensi-btn-masuk:disabled { background-color: #a7f3d0; color: #047857; cursor: not-allowed; }
.absensi-btn-keluar { background-color: #dc2626; color: #fff; }
.absensi-btn-keluar:disabled { background-color: #fecaca; color: #b91c1c; cursor: not-allowed; }
.absensi-btn-outline { background: #fff; border: 1px solid #cbd5e1; color: #334155; }
.absensi-photo-preview {
    width: 100%; max-width: 260px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0.75rem;
    background: #f1f5f9;
    display: block;
    margin-top: 0.5rem;
}
.absensi-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
}
.absensi-status-msg { font-size: 0.8rem; color: #64748b; margin-top: 0.4rem; }

/* Stok Barang -- tabel di desktop, kartu di HP supaya tidak kepotong */
.stok-table-wrap { overflow-x: auto; }
.stok-cards { display: none; }

.stok-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
}
.stok-card + .stok-card { margin-top: 0.7rem; }
.stok-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.stok-card-kode { font-size: 0.72rem; color: #94a3b8; }
.stok-card-nama { font-weight: 600; color: #0f172a; font-size: 0.92rem; margin-top: 0.15rem; line-height: 1.3; }
.stok-card-stok { text-align: right; flex-shrink: 0; }
.stok-card-stok-value { font-size: 1.05rem; font-weight: 700; }
.stok-card-stok-label { font-size: 0.66rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.03em; margin-top: 0.1rem; }
.stok-card-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; margin-top: 0.65rem; font-size: 0.8rem; color: #64748b; }
.stok-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-top: 0.65rem; padding-top: 0.6rem; border-top: 1px solid #f1f5f9; }
.stok-card-harga { font-size: 0.85rem; color: #475569; }

@media (max-width: 767px) {
    .stok-table-wrap { display: none; }
    .stok-cards { display: block; }
    .stok-toolbar { flex-direction: column; align-items: stretch; }
    .stok-toolbar > * { width: 100%; min-width: 0; }
    .stok-header { flex-wrap: wrap; gap: 0.6rem; }
}
