/* =========================
   RESET & BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: #C8EEF8;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body > main {
    flex: 1;
}

/* =========================
   HEADER
========================= */
header {
    text-align: center;
    padding: 20px 0;
}

.logo {
    width: 350px;
    max-width: 80%;
    margin: 0 auto 20px;
    display: block;
}

/* =========================
   NAVIGATION
========================= */
nav {
    background-color: #333;
    position: relative;
}

.menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.menu li a {
    display: block;
    padding: 12px 18px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s, transform 0.2s;
}

.menu li a:hover {
    background-color: #555;
    transform: scale(1.05);
}

/* Hamburger */
.hamburger {
    display: none;
    font-size: 30px;
    color: white;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

#menu-toggle {
    display: none;
}

/* =========================
   LAYOUT
========================= */
.layout,
.dashboard {
    display: flex;
    gap: 20px;
    padding: 20px;
    align-items: flex-start;
}

.layout main,
.dashboard main {
    flex: 1;
}

main {
    display: block;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #C8EEF8;
    padding: 20px;
    min-height: 100vh;
}

.sidebar ul {
    list-style: none;
}

.sidebar a {
    display: block;
    margin: 10px 0;
    color: black;
    text-decoration: none;
}

/* =========================
   CARD / CONTENT
========================= */
.card {
    background: #ffffff;
    padding: 25px;
    border-radius: 10px;
    max-width: 700px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card h2 {
    margin-bottom: 15px;
}

/* =========================
   FORMS
========================= */
form {
    margin-top: 10px;
}

form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

form input,
form textarea,
form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    transition: all 0.2s ease;
}

/* Focus effect */
form input:focus,
form textarea:focus,
form select:focus {
    border-color: #333;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

/* File input */
input[type="file"] {
    padding: 8px;
    background: #f9f9f9;
    cursor: pointer;
}

/* =========================
   BUTTONS
========================= */
/* Base button style */
.btn {
    display: inline-block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none; /* removes underline */
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Primary button (Update) */
.btn {
    background-color: #000;
    color: #fff;
}

/* Secondary button (Cancel) */
.btn-secondary {
    background-color: #000;
    color: #fff;
}

/* Hover effects */
.btn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

/* Click effect */
.btn:active {
    transform: translateY(0);
    opacity: 0.8;
}

/* Optional: focus outline for accessibility */
.btn:focus {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

/* Delete button */
.btn-delete {
    background: #c0392b;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    text-decoration: none;
}

/* Button group */
.button-group {
    display: flex;
    gap: 10px;
}

.button-group .btn {
    width: 50%;
}

/* =========================
   LOGIN PAGE ONLY
========================= */
.login-page main {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    background: #C8EEF8;
    padding: 35px;
    width: 350px;
    max-width: 90%;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 25px;
}

.extra {
    text-align: center;
    margin-top: 15px;
}

/* =========================
   TABLES
========================= */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table th,
.data-table td {
    border: 1px solid #ccc;
    padding: 10px;
}

.data-table th {
    background: #f4f4f4;
}

/* =========================
   FOOTER
========================= */
footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px;
}

/* =========================
   CUSTOM COMPONENTS
========================= */

/* Welcome box */
.welcome-box {
    background: #2c3e50;
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
}

.welcome-date {
    font-weight: normal;
    padding-top: 5px;
}

/* Ticker */
.ticker {
    overflow: hidden;
    background: #A3AABE;
    color: #fff;
    padding: 10px;
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: scroll 30s linear infinite;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Table actions */
.table-actions {
    margin-top: 20px;
    text-align: center;
}

/* Content area */
.content-area {
    display: block;
}

/* =========================
   MOBILE RESPONSIVE
========================= */
@media (max-width: 768px) {

    .menu {
        flex-direction: column;
        display: none;
        width: 100%;
    }

    #menu-toggle:checked + .hamburger + .menu {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .menu li {
        text-align: center;
        border-top: 1px solid #444;
    }

    .menu li a {
        padding: 15px;
    }

    .layout,
    .dashboard {
        flex-direction: column;
        gap: 10px;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
    }

    main {
        width: 100%;
        padding: 0 10px;
    }

    .card {
        margin: 0;
    }
}
