/* --- 1. CORE LAYOUT & GRID --- */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('../images/background.png') no-repeat center center fixed !important;
    background-size: cover !important;
    min-height: 100vh;
}

.container {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .container {
        max-width: 750px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.justify-content-center {
    justify-content: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

.d-flex {
    display: flex !important;
}

.w-100 {
    width: 100% !important;
}

/* --- GRID COLUMNS --- */
.col-md-4 {
    flex: 0 0 33.33%;
    max-width: 33.33%;
    padding: 0 15px;
}

.col-md-5 {
    flex: 0 0 41.6%;
    max-width: 41.6%;
    padding: 0 15px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
}

.col-lg-10 {
    flex: 0 0 83.3%;
    max-width: 83.3%;
    padding: 0 15px;
}

.col-lg-11 {
    flex: 0 0 91.6%;
    max-width: 91.6%;
    padding: 0 15px;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
}

/* --- 2. HEADER & NAVIGATION --- */
.navbar-custom {
    background: #ffffff !important;
    border-bottom: 5px solid #000000 !important;
    padding: 15px 0 !important;
    text-align: center;
    position: relative !important;
    width: 100%;
    margin-bottom: 30px;
}

.event-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0;
    display: inline-block;
    color: #000;
    border-bottom: 5px solid #ff0000 !important;
    padding-bottom: 5px;
}

/* Solid Red Logout Button in Header */
.top-right-logout.btn-danger-custom {
    position: absolute !important;
    top: 50% !important;
    right: 30px !important;
    transform: translateY(-50%);
    background: #dc3545 !important;
    border: 2px solid #dc3545 !important;
    color: #fff !important;
    padding: 8px 20px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: 0.2s;
}

.top-right-logout.btn-danger-custom:hover {
    background: #bb2d3b !important;
    border-color: #b02a37 !important;
}

.top-right-logout svg {
    fill: #fff !important;
}

/* --- 3. CUSTOM CARDS --- */
.custom-card {
    background: rgba(255, 255, 255, 0.96) !important;
    border-radius: 15px;
    padding: 40px;
    border: 1px solid #ccc;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 40px;
}

/* --- 4. FORMS & REQUIRED ASTERISK --- */
.form-label {
    font-weight: 700;
    display: block;
    margin-bottom: 6px;
    color: #000;
    text-align: left;
}

.required-label::after {
    content: " *";
    color: #ff0000;
    font-weight: bold;
}

.form-control,
.form-select {
    border: 2px solid #007bbd !important;
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    font-size: 1rem;
    background: #fff;
}

.form-control:focus,
.form-select:focus {
    outline: none;
}

.error-text {
    color: #dc3545 !important;
    font-size: 0.85rem;
    margin-top: 4px;
}

.file-guideline {
    color: #dc3545;
    font-size: 13px;
    margin-top: 4px;
    display: block;
}

/* --- 5. BUTTONS (SOLID FILLED) --- */
.btn-nephro {
    background: #000 !important;
    color: #fff !important;
    border: 3px solid #000 !important;
    font-weight: 800;
    padding: 10px 40px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: 0.2s ease-in-out;
    text-align: center;
}

.btn-nephro:hover {
    background: #333 !important;
    border-color: #333 !important;
}

/* Success Button (Filled Green) */
.btn-success-custom {
    background: #198754 !important;
    border-color: #198754 !important;
    color: #fff !important;
}

.btn-success-custom:hover {
    background: #157347 !important;
    border-color: #146c43 !important;
}

/* Danger Button (Filled Red) */
.btn-danger-custom {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
}

.btn-danger-custom:hover {
    background: #bb2d3b !important;
    border-color: #b02a37 !important;
}

/* Info Button (Filled Blue) */
.btn-info-custom {
    background: #007bbd !important;
    border-color: #007bbd !important;
    color: #fff !important;
}

.btn-info-custom:hover {
    background: #005a8d !important;
    border-color: #004d7a !important;
}

/* Warning Button (Filled Yellow) */
.btn-warning-custom {
    background: #ffc107 !important;
    border: 1px solid #ffc107 !important;
    color: #000 !important;
    padding: 6px 12px !important;
    border-radius: 5px !important;
    font-size: 0.85rem !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    transition: 0.2s ease-in-out !important;
}

.btn-warning-custom:hover {
    background: #e0a800 !important;
    border-color: #d39e00 !important;
    color: #000 !important;
}

/* --- 6. DASHBOARD TABLE --- */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.table th {
    background-color: #007bbd;
    color: #fff;
    text-align: left;
    padding: 15px;
    font-size: 0.9rem;
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

/* --- 7. UTILITIES --- */
.text-center {
    text-align: center !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

.me-2 {
    margin-right: 10px !important;
}

.pb-2 {
    padding-bottom: 0.5rem !important;
}

.pb-3 {
    padding-bottom: 1rem !important;
}

.border-bottom {
    border-bottom: 1px solid #dee2e6 !important;
}

/* --- ALERTS --- */
.alert-success-custom {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #0f5132;
    color: #fff;
    font-size: 0.9rem;
    animation: slideDown 0.35s ease;
}

.alert-icon {
    flex-shrink: 0;
}

.btn-close-alert {
    margin-left: auto;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
}

.btn-close-alert:hover {
    opacity: 1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 9. RESPONSIVE --- */
@media (max-width: 768px) {

    .event-title {
        font-size: 1.8rem;
    }

    .top-right-logout.btn-danger-custom {
        right: 15px !important;
        padding: 8px 12px !important;
    }

    .logout-text {
        display: none;
    }

    .custom-card {
        padding: 20px;
    }

    .col-md-4,
    .col-md-5,
    .col-md-6,
    .col-md-12,
    .col-lg-10,
    .col-lg-11 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 15px;
    }
}