:root {
    --hrms-ink: #0f172a;
    --hrms-muted: #64748b;
    --hrms-surface: #f4f7fb;
    --hrms-card: #ffffff;
    --hrms-accent: #0ea5a4;
    --hrms-accent-deep: #0f766e;
}

[x-cloak] {
    display: none !important;
}

body {
    background: var(--hrms-surface);
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
}

.font-display,
.font-display * {
    font-family: Fraunces, Georgia, 'Times New Roman', serif;
}

.hrms-card {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.hrms-stat {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    padding: 1.25rem;
    color: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.hrms-stat::after {
    content: '';
    position: absolute;
    right: -12px;
    bottom: -18px;
    width: 88px;
    height: 88px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.14);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.sidebar-link.active {
    background: #f0fdfa;
    color: #0f766e;
    box-shadow: inset 0 0 0 1px #ccfbf1;
}

.app-header-slot {
    min-width: 0;
}

.app-header-slot > div {
    min-width: 0;
    width: 100%;
}

.app-header-slot h1,
.app-header-slot h2 {
    font-size: 1.125rem;
    line-height: 1.25;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .app-header-slot h1,
    .app-header-slot h2 {
        font-size: 1.25rem;
    }
}

.app-header-slot .flex {
    flex-wrap: wrap;
    row-gap: 0.25rem;
}

.shadow-soft {
    box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
}

/* Form controls (replaces @tailwindcss/forms — works without Vite) */
input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
input[type='date'],
input[type='time'],
input[type='search'],
input[type='tel'],
input[type='url'],
input:not([type]),
textarea,
select,
.hrms-input {
    display: block;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #1e293b;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    appearance: none;
    -webkit-appearance: none;
}

textarea {
    min-height: 5.5rem;
    resize: vertical;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

input[type='text']:focus,
input[type='email']:focus,
input[type='password']:focus,
input[type='number']:focus,
input[type='date']:focus,
input[type='time']:focus,
input[type='search']:focus,
input[type='tel']:focus,
input[type='url']:focus,
input:not([type]):focus,
textarea:focus,
select:focus,
.hrms-input:focus {
    outline: none;
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.25);
}

input[type='checkbox'],
input[type='radio'] {
    width: 1rem;
    height: 1rem;
    min-height: 0;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 0.25rem;
    accent-color: #0d9488;
    box-shadow: none;
    display: inline-block;
    vertical-align: middle;
}

input[type='radio'] {
    border-radius: 9999px;
}

input:disabled,
textarea:disabled,
select:disabled {
    background-color: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}

input::placeholder,
textarea::placeholder {
    color: #94a3b8;
}

@media (max-width: 639px) {
    .app-header-slot a,
    .app-header-slot button:not([aria-label]) {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }

    table {
        font-size: 0.75rem;
    }

    .hrms-card {
        border-radius: 0.75rem;
    }
}
