/* ============================================================
   UDIN Web Application - Main Stylesheet
   Brand: Instros Color Scheme
   Primary: #0D237B (Dark Blue) | Secondary: #F7931E (Amber)
   ============================================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #F6F7FA;
    color: #333;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #0D237B;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ---- Top Navbar ---- */
.top-navbar {
    background: #0D237B;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
}

.navbar-brand i {
    font-size: 1.4rem;
    color: #F7931E;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
}

.btn-logout {
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.btn-logout:hover {
    background: rgba(255,255,255,0.25);
}

/* ---- Sidebar ---- */
.sidebar {
    width: 250px;
    background: #0D237B;
    min-height: calc(100vh - 60px);
    position: fixed;
    top: 60px;
    left: 0;
    overflow-y: auto;
    z-index: 900;
    transition: width 0.3s;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    color: #F7931E;
    font-size: 1.1rem;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-menu li a:hover,
.sidebar-menu li.active a {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: #F7931E;
}

.sidebar-menu li a i {
    width: 20px;
    text-align: center;
}

/* ---- Main Layout ---- */
.main-wrapper {
    display: flex;
    margin-top: 60px;
}

.content-area {
    margin-left: 250px;
    padding: 30px;
    width: calc(100% - 250px);
    min-height: calc(100vh - 60px);
}

.page-title {
    font-size: 1.6rem;
    margin-bottom: 24px;
    color: #0D237B;
}

.section-title {
    font-size: 1.1rem;
    margin: 20px 0 12px;
    color: #0D237B;
    border-bottom: 2px solid #F7931E;
    padding-bottom: 6px;
    display: inline-block;
}

/* ---- Cards ---- */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 24px;
}

.card-header {
    text-align: center;
    margin-bottom: 24px;
}

.card-header i {
    font-size: 2.5rem;
    color: #F7931E;
    margin-bottom: 10px;
}

.card-header h2 {
    margin-bottom: 6px;
}

.card-header p {
    color: #666;
    font-size: 0.95rem;
}

/* ---- Stats Grid ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
}

.stat-info h3 {
    font-size: 1.8rem;
    color: #333;
}

.stat-info p {
    color: #888;
    font-size: 0.9rem;
}

/* ---- Forms ---- */
.form-group {
    margin-bottom: 18px;
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #444;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.2s;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0D237B;
    box-shadow: 0 0 0 3px rgba(13,35,123,0.1);
}

.form-group input:disabled {
    background: #f0f0f0;
    color: #888;
}

.form-row {
    display: flex;
    gap: 20px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: #F7931E;
    color: #fff;
}

.btn-primary:hover {
    background: #e8850f;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-info {
    background: #0D237B;
    color: #fff;
}

.btn-info:hover {
    background: #091b5e;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-amber {
    background: #F7931E;
    color: #fff;
}

.btn-amber:hover {
    background: #e8850f;
}

.btn-block {
    display: flex;
    justify-content: center;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* ---- Tables ---- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.data-table thead {
    background: #0D237B;
    color: #fff;
}

.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
}

.data-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background 0.15s;
}

.data-table tbody tr:nth-child(even) {
    background: #f9f9fc;
}

.data-table tbody tr:hover {
    background: #eef1f9;
}

.data-table tbody td {
    padding: 12px 16px;
}

.table-responsive {
    overflow-x: auto;
}

.actions {
    white-space: nowrap;
    display: flex;
    gap: 6px;
}

/* ---- Badges ---- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

/* ---- Alerts ---- */
.alert {
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.92rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ---- Login Page ---- */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0D237B 0%, #1a3a9e 100%);
}

.login-container {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-header i {
    font-size: 3rem;
    color: #F7931E;
    margin-bottom: 10px;
}

.login-header h2 {
    margin-bottom: 4px;
}

.login-header p {
    color: #888;
    font-size: 0.85rem;
}

/* ---- Public Pages ---- */
.public-page {
    background: #F6F7FA;
}

.public-container {
    display: flex;
    justify-content: center;
    padding: 100px 20px 40px;
}

.verify-card {
    width: 100%;
    max-width: 600px;
}

.result-card {
    width: 100%;
    max-width: 700px;
}

/* ---- Status Section ---- */
.status-section {
    text-align: center;
    margin: 20px 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.status-success {
    background: #d4edda;
    color: #155724;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
}

.status-danger {
    background: #f8d7da;
    color: #721c24;
}

/* ---- Result Details ---- */
.result-details {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

.detail-row {
    display: flex;
    border-bottom: 1px solid #eee;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    width: 200px;
    min-width: 200px;
    padding: 12px 16px;
    background: #f8f9fc;
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.detail-value {
    padding: 12px 16px;
    flex: 1;
    font-size: 0.95rem;
}

/* ---- Info Section ---- */
.info-section p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* ---- Utility Classes ---- */
.text-center {
    text-align: center;
}

.text-muted {
    color: #999;
}

.text-danger {
    color: #dc3545;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }

    .content-area {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .detail-row {
        flex-direction: column;
    }

    .detail-label {
        width: 100%;
        min-width: unset;
    }

    .login-container {
        margin: 20px;
        padding: 24px;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 8px 10px;
        font-size: 0.84rem;
    }
}
