:root {
    --primary: #FF6B6B;      /* Soft Red */
    --secondary: #4ECDC4;    /* Teal */
    --accent: #FFE66D;       /* Soft Yellow */
    --dark: #2D3436;         /* Dark Grey */
    --light: #F7FFF7;        /* Off White */
    --text-color: #333;
    --sidebar-width: 250px;
    --border-radius: 15px;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

body {
    font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

/* Login Page */
.login-container {
    display: flex;
    justify_content: center;
    align-items: center;
    min-height: 100vh; /* Use min-height instead of height */
    width: 100%;       /* Ensure full width */
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 90%;        /* Responsive width */
    max-width: 400px;
    text-align: center;
    margin: auto;      /* Extra safety for centering */
}

.login-box .form-group {
    text-align: center;
}

.login-box .form-control {
    text-align: center;
}

.login-icon {
    font-size: 4em;
    margin-bottom: 10px;
    display: block;
    text-align: center;
}

.login-box h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 2em;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--secondary);
    outline: none;
}

.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 10px 20px;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

.btn.active, .btn:active {
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
    opacity: 0.8;
    transform: translateY(2px);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 8px;
}

.btn-primary {
    color: #fff;
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: #ff5252;
}

.btn-secondary {
    color: #fff;
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background-color: #3dbdb4;
}

.btn-info {
    color: #fff;
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-warning {
    color: #212529;
    background-color: var(--accent);
    border-color: var(--accent);
}

.btn-warning:hover {
    background-color: #e0cc60;
}

.btn-dark {
    color: #fff;
    background-color: var(--dark);
    border-color: var(--dark);
}

.btn-dark:hover {
    background-color: #000;
}

.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

/* Active State for Buttons */
.btn.active, .btn:active {
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
    opacity: 0.8;
    transform: translateY(2px);
}

/* Dashboard Layout */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: var(--secondary);
    color: #fff;
    transition: all 0.3s;
    min-height: 100vh;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: var(--primary);
    text-align: center;
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul li {
    padding: 10px;
    font-size: 1.1em;
    display: block;
}

#sidebar ul li a {
    color: #fff;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 10px;
    transition: 0.3s;
}

#sidebar ul li a:hover, #sidebar ul li.active > a {
    background: rgba(255,255,255,0.2);
    margin-left: 5px;
}

#content {
    width: 100%;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Card Style */
.card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
    border: none;
}

.card-header {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
}

/* Table Style */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    color: var(--dark);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
