/* Project Author: Ciden Ngoma - SID:2602150912 */

/* Global styles */
* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    background-color: #f4f4f4;
    color: #222;
    margin: 0;
    padding: 0;
}

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

.container {
    width: 100%;
    margin: auto;
}

/* Header styling */
.site-header {
    background-color: #333;
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.logo {
    display: block;
    width: 150px;
    height: 50px;
    object-fit: contain;
}

.brand-mark {
    background-color: #0f766e;
    color: white;
    padding: 8px;
    border-radius: 4px;
}

/* Navigation links */
.nav {
    display: flex;
    gap: 10px;
}

.nav a {
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
}

.nav a:hover,
.nav-cta {
    background-color: #0f766e;
}

.nav-toggle {
    display: none;
    background-color: white;
    border: none;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px;
    background-color: #333;
}

/* Button styling */
.btn {
    display: inline-block;
    background-color: #0f766e;
    color: white;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #115e59;
}

.btn-secondary {
    background-color: #e5e7eb;
    color: #0f766e;
}

.btn-danger {
    background-color: #dc2626;
}

/* Hero section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
    padding: 50px;
}

.hero h1 {
    font-size: 3rem;
    margin: 10px 0;
}

.hero p,
.muted,
.card p {
    color: #666;
    line-height: 1.6;
}

.hero-actions,
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.js-demo {
    margin-top: 20px;
}

.hero-visual img {
    width: 100%;
    border-radius: 8px;
}

/* Cards and page sections */
.section,
.page {
    padding: 30px 50px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card,
.metric,
.form-card,
.dashboard-panel,
.sidebar {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
}

.card {
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-4px);
}

.badge {
    display: inline-block;
    background-color: #d1fae5;
    color: #065f46;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.metric strong {
    display: block;
    font-size: 1.6rem;
}

/* Forms */
.form-card {
    max-width: 700px;
    margin: 40px auto;
}

.form-grid,
.filter-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.full {
    grid-column: 1 / -1;
}

label {
    display: block;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font: inherit;
}

form .btn {
    margin-top: 10px;
}

textarea {
    min-height: 120px;
}

/* Dashboard and tables */
.dashboard {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
}

.sidebar a {
    display: block;
    padding: 10px;
    border-radius: 4px;
    color: #333;
}

.sidebar a:hover,
.sidebar .active {
    background-color: #d1fae5;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

th {
    background-color: #f0f0f0;
}

/* Footer styling */
.footer {
    background-color: #333;
    color: white;
    padding: 1rem;
    text-align: center;
}

/* Mobile-first approach */
@media screen and (max-width: 767px) {
    body {
        font-size: 14px;
    }

    .site-header {
        flex-wrap: wrap;
    }

    nav a {
        display: block;
        margin: 10px 0;
    }

    .nav-toggle {
        display: block;
    }

    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        margin-top: 10px;
    }

    .nav.open {
        display: flex;
    }

    .hero,
    .section,
    .page {
        padding: 20px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .grid,
    .metric-grid,
    .form-grid,
    .filter-bar {
        grid-template-columns: 1fr;
    }
}

/* Tablet devices */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    body {
        font-size: 18px;
    }

    .container {
        width: 90%;
        margin: auto;
    }

    .hero,
    .dashboard {
        grid-template-columns: 1fr;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop devices */
@media screen and (min-width: 1025px) {
    body {
        font-size: 20px;
    }

    .container {
        width: 80%;
        margin: auto;
    }
}
