/* === RESET & BASE === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }

/* === NAVBAR === */
.navbar {
    background: linear-gradient(135deg, #1a237e, #283593);
    color: #fff;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 64px;
}
.navbar .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.navbar .logo img {
    height: 40px;
}
.navbar nav { display: flex; gap: 0.25rem; }
.navbar nav a {
    color: rgba(255,255,255,0.85);
    padding: 0.6rem 1.1rem;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.95rem;
    font-weight: 500;
}
.navbar nav a:hover,
.navbar nav a.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* === HERO === */
.hero {
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 50%, #1565c0 100%);
    color: #fff;
    text-align: center;
    padding: 5rem 2rem 4rem;
}
.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
}
.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}
.hero-cards {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}
.hero-card {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 16px;
    padding: 2rem;
    width: 280px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}
.hero-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    background: rgba(255,255,255,0.18);
}
.hero-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.hero-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.hero-card p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* === CONTAINER === */
.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* === CARD === */
.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.card h2 {
    color: #1a237e;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e8eaf6;
    font-size: 1.4rem;
}

/* === FORMS === */
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
}
.form-group label .required {
    color: #e53935;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #1a237e;
    box-shadow: 0 0 0 3px rgba(26,35,126,0.1);
    outline: none;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* === DYNAMIC ITEMS === */
.dynamic-group {
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.dynamic-group h4 {
    margin-bottom: 1rem;
    color: #1a237e;
}
.dynamic-item {
    display: flex;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
.dynamic-item input {
    flex: 1;
    min-width: 150px;
    padding: 0.55rem 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
}
.dynamic-item input:focus {
    border-color: #1a237e;
    outline: none;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.4rem;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-primary {
    background: linear-gradient(135deg, #1a237e, #283593);
    color: #fff;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #0d1654, #1a237e);
    box-shadow: 0 4px 12px rgba(26,35,126,0.3);
}
.btn-success {
    background: linear-gradient(135deg, #2e7d32, #388e3c);
    color: #fff;
}
.btn-success:hover { box-shadow: 0 4px 12px rgba(46,125,50,0.3); }
.btn-danger {
    background: linear-gradient(135deg, #c62828, #e53935);
    color: #fff;
}
.btn-danger:hover { box-shadow: 0 4px 12px rgba(198,40,40,0.3); }
.btn-warning {
    background: linear-gradient(135deg, #e65100, #f57c00);
    color: #fff;
}
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.btn-outline {
    background: transparent;
    border: 2px solid #1a237e;
    color: #1a237e;
}
.btn-outline:hover {
    background: #1a237e;
    color: #fff;
}
.btn-add {
    background: #e8eaf6;
    color: #1a237e;
    border: 2px dashed #1a237e;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}
.btn-add:hover { background: #c5cae9; }
.btn-remove {
    background: #ffebee;
    color: #c62828;
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}
.btn-remove:hover { background: #ffcdd2; }

/* === ALERTS === */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-weight: 500;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.alert-danger { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.alert-info { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }
.alert-warning { background: #fff3e0; color: #e65100; border: 1px solid #ffe0b2; }

/* === TABLE === */
.table-responsive { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
table th, table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}
table th {
    background: #f5f5f5;
    font-weight: 700;
    color: #444;
    white-space: nowrap;
}
table tr:hover { background: #fafafa; }

/* === BADGES === */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-waiting { background: #fff3e0; color: #e65100; }
.badge-approved { background: #e8f5e9; color: #2e7d32; }
.badge-rejected { background: #ffebee; color: #c62828; }

/* === ADMIN LAYOUT === */
.admin-wrapper { display: flex; min-height: 100vh; }
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1a237e, #0d1654);
    color: #fff;
    padding: 1.5rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}
.sidebar .brand {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
}
.sidebar .brand h3 { font-size: 1.1rem; }
.sidebar .brand small { opacity: 0.7; font-size: 0.8rem; }
.sidebar a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.7);
    transition: all 0.2s;
    font-size: 0.95rem;
}
.sidebar a:hover, .sidebar a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.sidebar a .icon { width: 20px; text-align: center; }
.admin-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    background: #f0f2f5;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.admin-header h1 { font-size: 1.5rem; color: #1a237e; }

/* === STAT CARDS === */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.stat-card .stat-info h3 { font-size: 1.6rem; color: #333; }
.stat-card .stat-info p { font-size: 0.85rem; color: #888; }

/* === LOGIN === */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a237e, #0d47a1);
}
.login-box {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.login-box h2 {
    text-align: center;
    color: #1a237e;
    margin-bottom: 0.5rem;
}
.login-box .subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* === SURAT / LETTER === */
.surat-container {
    max-width: 800px;
    margin: 2rem auto;
    background: #fff;
    padding: 3rem;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.8;
}
.surat-header {
    text-align: center;
    border-bottom: 3px double #333;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}
.surat-header h2 { font-size: 1.2rem; margin-bottom: 0.25rem; }
.surat-header h3 { font-size: 1rem; }
.surat-header p { font-size: 0.85rem; }
.surat-body { font-size: 0.95rem; }
.surat-body table td { padding: 0.2rem 0.5rem; vertical-align: top; font-size: 0.95rem; border: none; }
.surat-body table tr:hover { background: transparent; }
.surat-ttd {
    margin-top: 2.5rem;
    text-align: center;
    float: right;
    width: 280px;
}
.surat-ttd .ttd-space { height: 80px; }
.surat-ttd .nama { font-weight: 700; text-decoration: underline; }
.no-print { }
@media print {
    .no-print { display: none !important; }
    .surat-container { box-shadow: none; margin: 0; padding: 2rem; }
    body { background: #fff; }
}

/* === FOOTER === */
.footer {
    text-align: center;
    padding: 2rem;
    color: #888;
    font-size: 0.85rem;
    margin-top: 2rem;
}

/* === DETAIL VIEW === */
.detail-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 0.5rem 1rem;
    margin-bottom: 1.5rem;
}
.detail-grid .label {
    font-weight: 600;
    color: #555;
}
.detail-grid .value { color: #333; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .navbar { padding: 0 1rem; flex-direction: column; gap: 0.5rem; padding-bottom: 0.75rem; }
    .navbar nav { flex-wrap: wrap; justify-content: center; }
    .hero { padding: 3rem 1rem 2.5rem; }
    .hero h1 { font-size: 1.8rem; }
    .hero-cards { flex-direction: column; align-items: center; }
    .form-row { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .admin-content { margin-left: 0; padding: 1rem; }
    .stat-cards { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .surat-container { padding: 1.5rem; margin: 1rem; }
}
