* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Google Sans Flex", sans-serif;
    background: #f5f5f5;
    color: #1a1a1a;
    font-size: 14px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body a{
    font-family: "Google Sans Flex", sans-serif;
}

body input{
    font-family: "Google Sans Flex", sans-serif;
}

body button{
    font-family: "Google Sans Flex", sans-serif;
}

body select{
    font-family: "Google Sans Flex", sans-serif;
}

body textarea{
    font-family: "Google Sans Flex", sans-serif;
}

/* ───── HEADER ───── */
header {
    background: #194169;
    color: #f7f4f4;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo{
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: url(images/logo.png) center / cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

header h1 {
    font-family: "Lora", serif;
    font-weight: 500; 
    font-size: 21px;
    letter-spacing: 1px;
}

header p {
    font-size: clamp(11px, 1.2vw, 13px);
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
    font-weight: 500;
}

/* ───── NAV ───── */
nav {
    background: #194169;
    padding: 0 2rem;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 13px;
    padding: 0.6rem 0;
    white-space: nowrap;
    display: inline-block;
    border-bottom: 2px solid transparent;
}

nav a.active {
    color:#f7f4f4;
    border-bottom-color: #7ec0c9;
}

/* ───── PAGE BODY ───── */
.pg-body {
    padding: 1.5rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* ───── HERO ───── */
.hero {
    background:#fafafa;
    border-bottom: 1px solid #dde8e1;
    padding: 1.75rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.hero-text {
    flex: 1;
}

.hero-text h2 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: #1a1a1a;
}

.hero-text p {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.hero-search {
    flex-shrink: 0;
    width: 320px;
}

.hero-search label {
    font-size: 12px;
    color: #777;
    display: block;
    margin-bottom: 0.4rem;
}

.hero-search-row {
    display: flex;
    gap: 6px;
}

.hero-search-row input {
    flex: 1;
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #dde8e1;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s;
}

.hero-search-row input:focus {
    border-color:#194169;
}

.hero-search-row button {
    padding: 8px 14px;
    background:#194169;
    color:#f7f4f4;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.hero-search-row button:hover {
    background: #213458;
}

/* ───── HOMEPAGE SECTION ───── */
.section {
    padding: 1.5rem 2rem;
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #777;
    margin-bottom: 1rem;
}

/* ───── SERVICE CARDS ───── */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.card {
    background:#fafafa;
    border: 1px solid #dde8e1;
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color 0.15s;
}

.card:hover {
    border-color:#194169;
}

.card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 16px;
}

.icon-ict { background: #eaf3de; }
.icon-upload { background: #eaf3de; }
.icon-track {background: #eaf3de;}

.card h3 {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.card p {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.card-link {
    font-size: 12px;
    color:#194169;
    font-weight: 500;
}

/* ───── FORM CARD ───── */
.form-card {
    background:#f7f4f4;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #dde8e1;
    margin-bottom: 1.5rem;
}

.form-card-header {
    background:#194169;
    padding: 1rem 1.5rem;
}

.form-card-header h2 {
    color:#f7f4f4;
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 500;
    margin: 0;
}

.form-card-header p {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    margin-top: 3px;
}

.form-section {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color:#194169;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #dde8e1;
}

/* ───── FORM FIELDS ───── */
.field {
    margin-bottom: 0.9rem;
}

.field label {
    display: block;
    font-size: 13px;
    color: #444;
    margin-bottom: 5px;
    font-weight: 500;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    color: #1a1a1a;
    background: #fafafa;
    -webkit-appearance: none;
    appearance: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color:#194169;
    background:#f7f4f4;
}

.field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.field textarea {
    resize: vertical;
    min-height: 90px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.lain-box {
    display: none;
    margin-top: 8px;
}

.required {
    color: #c0392b;
}

/* ───── FORM FOOTER ───── */
.form-footer {
    padding: 1rem 1.5rem;
    background: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
}

.btn-back {
    font-size: 13px;
    color: #666;
    text-decoration: none;
}

.btn-submit {
    background:#194169;
    color:#f7f4f4;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}

.btn-submit:hover {
    background: #213458;
}

/* ───── FOOTER ───── */
footer {
    background: #194169;
    color: rgba(255, 255, 255, 0.7);
    padding: 1rem 2rem;
    font-size: 12px;
    display: flex;
    justify-content: space-between; /* Pushes left and right sides apart */
    align-items: center; /* Centers everything vertically on the line */
    gap: 2rem;
    margin-top: auto;
}

footer strong {
    color: #ffffff;
}

.footer-content {
    white-space: nowrap; /* Keeps the address strictly on one line */
}

.footer-content .divider {
    margin: 0 8px;
    color: rgba(255, 255, 255, 0.3);
}

/* Keeps Copyright and Icon perfectly together */
.footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap; 
}

/* Interactive Login Icon */
.footer-login-link {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s ease;
    text-decoration: none;
}

.footer-login-link:hover {
    color: #ffffff;
}

.user-icon {
    width: 16px; /* Slightly smaller to match the 12px font beautifully */
    height: 16px;
    margin: 0;
}

/* ───── RESPONSIVE ───── */
@media (max-width: 640px) {
    .pg-body {
        padding: 0.75rem;
    }

    .form-card {
        border-radius: 8px;
    }

    header {
        padding: 0.85rem 1rem;
    }

    nav {
        padding: 0 1rem;
    }
    .hero {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .hero-search {
        width: 100%;
    }

    .section {
        padding: 1rem;
    }

    .form-section {
        padding: 1rem;
    }

    .form-footer {
        padding: 0.85rem 1rem;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    footer {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }
}

/* ── DASHBOARD BODY ── */
.dashboard-body {
    padding: 1.25rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

/* ── STAT CARDS ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 1.5rem;
}

.stat-card {
    border-radius: 10px;
    padding: 1rem 1.25rem;
    color:#f7f4f4;
    text-align: center;
}

.stat-card h2 {
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-card p {
    font-size: 12px;
    opacity: 0.85;
}

.sc-blue { background: #185fa5; }
.sc-orange { background: #b35c00; }
.sc-green { background: #2d6a1f; }

/* ── SECTION HEADING ── */
.section-heading {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color:#194169;
    margin: 0 0 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-heading a {
    font-size: 12px;
    color: #185fa5;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    text-decoration: none;
}

/* ── DATA TABLE ── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background:#fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #dde8e1;
    margin-bottom: 1.5rem;
}

.data-table th {
    background: #f4f7f5;
    padding: 9px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #444;
    border-bottom: 1px solid #dde8e1;
}

.data-table td {
    padding: 9px 12px;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.td-truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── BADGES ── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-pending  { background: #faeeda; color: #854f0b; }
.badge-progress { background: #e6f1fb; color: #0c447c; }
.badge-done     { background: #eaf3de; color: #27500a; }

/* ── TOOLBAR (search + filter) ── */
.toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
    flex-wrap: wrap;

}

.toolbar input[type="text"] {
    flex: 1;
    min-width: 150px;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
}

.toolbar select {
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
    background:#f7f4f4;
}

.toolbar button {
    padding: 7px 16px;
    background:#194169;
    color:#f7f4f4;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.toolbar button:hover {
    background: #213458;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.page-header h1 {
    margin: 0;
    font-size: 22px;
}

.page-header p {
    margin: 0;
    color: #666;
    font-size: 13px;
}

.activity-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.activity-filter label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 220px;
}

.filter-label {
    font-size: 12px;
    color: #666;
}

.activity-filter select,
.activity-filter button {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    color: #1a1a1a;
}

.activity-filter button {
    cursor: pointer;
    background: #194169;
    color: #f7f4f4;
    border-color: #194169;
}

.activity-filter button:hover {
    background: #213458;
}

.activity-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 1rem;
}

.activity-row {
    display: grid;
    grid-template-columns: 1fr 180px 120px;
    gap: 1rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f5f5f5;
}

.activity-row:last-child {
    border-bottom: none;
}

.activity-row span,
.activity-row div {
    font-size: 13px;
    color: #333;
}

.activity-label {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.activity-meta {
    color: #777;
    font-size: 12px;
}

.activity-time {
    text-align: right;
}

.badge-admin {
    background: #e6f1fb;
    color: #0c447c;
}

.badge-user {
    background: #eaf3de;
    color: #27500a;
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: #999;
    border: 1px solid #f5f5f5;
    border-radius: 14px;
}

.db-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    color: #194169;
    text-decoration: none;
    font-size: 13px;
}

.db-link:hover {
    background: #f7f7f7;
}

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

.btn-reset {
    padding: 7px 16px;
    background: #f0f0f0;
    color: #444;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    display: inline-block;
}

.btn-reset:hover {
    background: #e0e0e0;
}

/* ── PAGINATION ── */
.pagination-wrap {
    padding: 0.75rem 1.25rem;
    background: #194169;
    border-top: 1px solid #ffffff;
}

/* Adjusting Laravel's default layout */
.pagination-wrap nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.pagination-wrap div p {
    font-size: 12px;
    color: #ffffff;
    margin: 0;
}

/* Constrain the auto-generated SVGs from Laravel */
.pagination-wrap svg {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-body {
        padding: 0.75rem;
    }

    .data-table th,
    .data-table td {
        padding: 7px 8px;
        font-size: 12px;
    }

    .toolbar {
        flex-direction: column;
    }

    .toolbar input[type="text"],
    .toolbar select,
    .toolbar button,
    .btn-reset {
        width: 100%;
    }
}

.btn-view {
    display: inline-block;
    padding: 4px 12px;
    background: #e6f1fb;
    color: #0c447c;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #b5d4f4;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.btn-view:hover {
    background: #b5d4f4;
    border-color: #85b7eb;
}

/* ── MODAL ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    z-index: 100;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-overlay.active {
    display: flex;
    background: rgba(0,0,0,0.45);
}

.modal {
    background:#f7f4f4;
    border-radius: 12px;
    width: 90%;
    max-width: 620px;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid #dde8e1;
    transform: translateY(16px);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    background:#194169;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    color:#f7f4f4;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.15s;
}

.modal-close:hover {
    color:#f7f4f4;
}

.modal-body {
    padding: 1.25rem;
}

.detail-group {
    margin-bottom: 1.25rem;
}

.detail-section-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color:#194169;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #dde8e1;
}

.detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 0.6rem;
}

.detail-field label {
    display: block;
    font-size: 11px;
    color: #777;
    margin-bottom: 3px;
}

.detail-field p {
    font-size: 13px;
    color: #1a1a1a;
    margin: 0;
}

/* ── DELETE BUTTON ── */
.btn-delete {
    padding: 7px 16px;
    background: #fdf0f0;
    color: #a32d2d;
    border: 1px solid #f5c1c1;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.btn-delete:hover:not(:disabled) {
    background: #f5c1c1;
    border-color: #e24b4a;
}

.btn-delete:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#resendBtn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#resendBtn:not(:disabled) {
    opacity: 1;
    cursor: pointer;
}

/* ── MODAL ACTION BUTTONS ── */
.modal-actions {
    display: flex;
    gap: 8px;
}

.btn-lulus {
    padding: 8px 20px;
    background: #eaf3de;
    color: #27500a;
    border: 1px solid #c0dd97;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-lulus:hover {
    background: #c0dd97;
}

.btn-tolak {
    padding: 8px 20px;
    background: #fdf0f0;
    color: #a32d2d;
    border: 1px solid #f5c1c1;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-tolak:hover {
    background: #f5c1c1;
}

/* ── CHECKBOX ── */
input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color:#194169;
    cursor: pointer;
}

/* ── ADMIN GRID & LAYOUT ── */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

.data-table-container {
    margin-top: 1rem;
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #dde8e1;
    border-radius: 10px;
    background: #fff;
    margin-bottom: 1rem;
}

/* ── ALERTS ── */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #eaf3de;
    color: #27500a;
    border-color: #c0dd97;
}

/* ── ACTION BUTTONS ── */
.action-btns {
    display: flex;
    gap: 6px;
}

.btn-edit {
    display: inline-block;
    padding: 4px 12px;
    background: #fef9c3;
    color: #854f0b;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid #fde047;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-edit:hover {
    background: #fde047;
}

/* ── NEWS TICKER ── */
.news-ticker-container {
    display: flex;
    background: #1e293b;
    color: #f8fafc;
    height: 40px;
    align-items: center;
    overflow: hidden;
    border-top: 3px solid #194169;
    font-size: 13px;
}

.ticker-label {
    background: #194169;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.75px;
    z-index: 10;
    white-space: nowrap;
}

/* ── SUB-ADMIN UTILITIES ── */
.scope-badge {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-top: 5px;
    border: 1px solid #bfdbfe;
}

.bg-hadir { background: #dcfce7 !important; color: #166534 !important; }
.bg-tiada { background: #fee2e2 !important; color: #991b1b !important; }

.btn-remove-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
    padding-bottom: 2px;
}

.btn-remove-small:hover {
    background: #fecaca;
}
