﻿
/* ---------- RESET & BASE ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #333;
    height: 100vh;
    display: flex;
    overflow: hidden; /* no double scroll */
}

/* ---------- SIDEBAR (fixed left) ---------- */
.sidebar {
    width: 250px;
    background-color: #1a237e;
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    height: 100vh;
    flex-shrink: 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: width 0.3s ease;
}

.sidebar-header {
    padding: 0 20px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

    .sidebar-header h2 {
        font-size: 18px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .sidebar-header h2 i {
            color: #ffc107;
        }

.nav-menu {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nav-item {
    width: 100%;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: #cfd8dc;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 4px solid transparent;
}

    .nav-link i {
        width: 20px;
        text-align: center;
        font-size: 18px;
    }

    .nav-link:hover, .nav-link.active {
        background-color: rgba(255,255,255,0.1);
        color: #fff;
        border-left-color: #ffc107;
    }
    /* logout at bottom */
    .nav-link.logout {
        margin-top: auto;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

        .nav-link.logout:hover {
            color: #ff5252;
            border-left-color: #ff5252;
        }

/* ---------- MAIN CONTENT (scrollable) ---------- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    padding: 30px;
}

/* ---------- ACTION BAR ---------- */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 500px;
}

    .search-wrapper input {
        width: 100%;
        padding: 10px 15px;
        padding-right: 40px;
        border-radius: 25px;
        border: 1px solid #e0e0e0;
        background-color: #f9f9f9;
        font-size: 15px;
        outline: none;
        transition: all 0.3s ease;
    }

        .search-wrapper input:focus {
            border-color: #1a237e;
            background-color: #fff;
            box-shadow: 0 0 0 3px rgba(26,35,126,0.1);
        }

    .search-wrapper i {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #888;
    }

/* ---------- ADD SCHEME FORM (visible) ---------- */
.form-container {
    background: #fff;
    padding: 25px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
}

.form-group-vertical {
    margin-bottom: 15px;
}

    .form-group-vertical label {
        display: block;
        font-weight: 600;
        margin-bottom: 5px;
        color: #444;
        font-size: 14px;
    }

    .form-group-vertical input,
    .form-group-vertical textarea {
        width: 100%;
        max-width: 500px;
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 6px;
        font-size: 14px;
        outline: none;
        transition: border 0.3s;
    }

    .form-group-vertical textarea {
        resize: vertical;
        min-height: 80px;
    }

        .form-group-vertical input:focus,
        .form-group-vertical textarea:focus {
            border-color: #1a237e;
        }

.btn-submit-form {
    background-color: #2e7d32;
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.3s;
    margin-top: 5px;
}

    .btn-submit-form:hover {
        background-color: #1b5e20;
    }

/* ---------- SCHEME GRID (4 cols) ---------- */
.schemes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* scheme card */
.scheme-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

    .scheme-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    }

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.card-icon {
    width: 40px;
    height: 40px;
    background-color: #e8eaf6;
    color: #1a237e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a237e;
    line-height: 1.2;
}

.card-body {
    flex: 1;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.action-btn {
    border: none;
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-edit {
    background-color: #e3f2fd;
    color: #1565c0;
}

    .btn-edit:hover {
        background-color: #1565c0;
        color: #fff;
    }

.btn-delete {
    background-color: #ffebee;
    color: #c62828;
}

    .btn-delete:hover {
        background-color: #c62828;
        color: #fff;
    }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px) {
    .schemes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .schemes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-group-vertical input,
    .form-group-vertical textarea {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
        overflow-y: auto;
        height: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 10px 0;
    }

    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        padding: 10px 15px;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

        .nav-link:hover, .nav-link.active {
            border-left-color: transparent;
            border-bottom-color: #ffc107;
        }

        .nav-link.logout {
            margin-top: 0;
            border-top: none;
        }

    .main-content {
        height: auto;
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrapper {
        max-width: 100%;
    }

    .schemes-grid {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 20px;
    }
}


