@import 'tailwindcss';

@source '../views/**/*.blade.php';
@source '../js/**/*.{js,jsx,ts,tsx}';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';

@theme {
    --font-sans: 'Segoe UI', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --color-brand-50: #f0f7ff;
    --color-brand-100: #e0effe;
    --color-brand-500: #008bc8;
    --color-brand-600: #28679b;
    --color-brand-700: #1d3a58;
    --color-brand-900: #132a40;
}

/* Custom scrollbars & smooth transitions */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Magic UI & Aceternity UI Animations */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes pulse-subtle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.03); }
}

.animate-shimmer {
    animation: shimmer 2.5s infinite;
}

.animate-pulse-subtle {
    animation: pulse-subtle 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.magic-border-glow {
    position: relative;
    background: linear-gradient(135deg, rgba(37,73,107,0.12), rgba(22,52,80,0.04));
    border: 1px solid rgba(37,73,107,0.2);
}

.magic-border-glow:hover {
    border-color: rgba(37,73,107,0.45);
    box-shadow: 0 10px 30px -10px rgba(22,52,80,0.15);
}

.bento-card {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -10px rgba(18,36,52,0.08);
}

html { color-scheme: light; }
body { -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid #365a7c; outline-offset: 2px; }

/* Confirmation dialogs share a compact institutional treatment. */
.app-confirm-container { background: rgba(16, 36, 53, .54) !important; padding: 16px !important; }
.app-confirm-popup {
    position: relative !important;
    overflow: hidden !important;
    border: 1px solid #dce6ed !important;
    border-radius: 16px !important;
    padding: 24px 26px 0 !important;
    text-align: left !important;
    font-family: var(--font-sans) !important;
    box-shadow: 0 24px 70px rgba(13, 36, 55, .22) !important;
}
.app-confirm-popup::before {
    content: 'CONFIRMACIÓN  ·  UGEL AMBO';
    display: block;
    min-height: 32px;
    padding: 9px 42px 0 44px;
    color: #658096;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .12em;
}
.app-confirm-logo { position: absolute !important; left: 26px !important; top: 24px !important; width: 32px !important; height: 32px !important; margin: 0 !important; border-radius: 50% !important; object-fit: contain !important; }
.app-confirm-title { margin: 24px 0 0 !important; padding: 0 !important; color: #173650 !important; font-size: 1.25rem !important; line-height: 1.3 !important; font-weight: 650 !important; letter-spacing: -.02em !important; text-align: left !important; }
.app-confirm-text { margin: 9px 0 0 !important; padding: 0 !important; color: #5b6d7c !important; font-size: .875rem !important; line-height: 1.65 !important; text-align: left !important; overflow-wrap: anywhere; }
.app-confirm-actions { width: calc(100% + 52px) !important; margin: 24px -26px 0 !important; padding: 16px 26px !important; gap: 10px !important; justify-content: flex-end !important; border-top: 1px solid #e9eff3; background: #f8fafc; }
.app-confirm-button, .app-confirm-cancel { min-height: 42px; margin: 0 !important; border-radius: 9px; padding: 10px 16px; font-size: .875rem; font-weight: 600; cursor: pointer; transition: background-color .18s ease, border-color .18s ease; }
.app-confirm-button { border: 1px solid #194b6b; background: #194b6b; color: white; }
.app-confirm-button:hover { background: #123a55; border-color: #123a55; }
.app-confirm-danger { border-color: #a52b35; background: #a52b35; }
.app-confirm-danger:hover { background: #86212a; border-color: #86212a; }
.app-confirm-cancel { border: 1px solid #d4e0e8; background: white; color: #3c5364; }
.app-confirm-cancel:hover { background: #eef4f7; border-color: #b4c8d5; }
.app-confirm-close { position: absolute !important; top: 18px !important; right: 19px !important; width: 32px !important; height: 32px !important; border-radius: 8px !important; color: #718594 !important; font-size: 25px !important; }
.app-confirm-close:hover { background: #eef4f7 !important; color: #173650 !important; }
.app-confirm-close:focus-visible, .app-confirm-button:focus-visible, .app-confirm-cancel:focus-visible { outline: 2px solid #008bc8 !important; outline-offset: 2px !important; }
.app-confirm-icon { margin: 16px 0 0 !important; }
@media (max-width: 420px) {
    .app-confirm-popup { padding: 22px 20px 0 !important; }
    .app-confirm-logo { left: 20px !important; top: 22px !important; }
    .app-confirm-actions { width: calc(100% + 40px) !important; margin-left: -20px !important; margin-right: -20px !important; padding: 14px 20px !important; }
    .app-confirm-button, .app-confirm-cancel { flex: 1 1 auto; }
}

/* Shared surfaces and interaction details across the institutional workspace. */
.surface-card {
    border: 1px solid #dce5ed;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(29, 58, 88, 0.045);
}
button, a { -webkit-tap-highlight-color: transparent; }
button:not(:disabled), a { transition-property: color, background-color, border-color, box-shadow, transform; transition-duration: 180ms; }
input, select, textarea { accent-color: #28679b; }
::selection { background: #cfeafa; color: #1d3a58; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

input:not([type="checkbox"]):not([type="radio"]):focus-visible,
select:focus-visible, textarea:focus-visible {
    outline: 2px solid #28679b;
    outline-offset: 2px;
}

/* Tables become readable record cards on smaller screens. */
@container workspace (width < 960px) {
    .responsive-table { min-width: 0; display: block; }
    .responsive-table thead { display: none; }
    .responsive-table tbody { display: block; }
    .responsive-table tr { display: block; padding: 0.5rem 0; }
    .responsive-table td { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; max-width: none; padding: 0.5rem 1.25rem; text-align: right; }
    .responsive-table td::before { content: attr(data-label); flex: 0 0 auto; max-width: 45%; color: #64748b; font-size: 0.75rem; font-weight: 600; text-align: left; }
    .responsive-table td { white-space: normal; overflow-wrap: anywhere; }
    .responsive-table td > div { min-width: 0; }
    .responsive-table td .truncate { white-space: normal; overflow-wrap: anywhere; }
}
