:root {
    --theme-color: #40667b;
    --theme-dark: #35718f;
    --bg-light: #f0f8ff;
    --text-color: #1f2a44;
    --danger-color: #c0392b;
    --success-color: #2ecc71;
}

* {
    box-sizing: border-box;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

body {
    margin: 0;
    background: var(--bg-light);
    color: var(--text-color);
}

.container {
    width: 95%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 1.5rem 0;
}

.app-header {
    background: linear-gradient(135deg, var(--theme-color), var(--theme-dark));
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.app-header h1 {
    margin: 0;
}

.app-header nav {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.app-header nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.app-header nav a:hover,
.app-header nav a:focus {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.app-header nav a.logout {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(173, 216, 230, 0.45);
}

.card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--theme-dark);
}

form .form-group {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="password"],
input[type="datetime-local"],
select {
    width: 100%;
    padding: 0.65rem;
    border: 1px solid #cfe0f1;
    border-radius: 8px;
    background: #f8fcff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus {
    border-color: var(--theme-dark);
    box-shadow: 0 0 0 3px rgba(95, 158, 160, 0.2);
    outline: none;
}

button {
    background: linear-gradient(135deg, var(--theme-color), var(--theme-dark));
    color: #fff;
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(95, 158, 160, 0.3);
}

.flash {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.flash.success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.45);
}

.flash.error {
    background: rgba(192, 57, 43, 0.15);
    border: 1px solid rgba(192, 57, 43, 0.45);
}

.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    table-layout: auto;
}

th,
td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2ecf6;
    text-align: left;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

th {
    background: rgba(173, 216, 230, 0.3);
    color: var(--theme-dark);
}

.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    color: #fff;
}

.status-badge.active {
    background: var(--success-color);
}

.status-badge.expired {
    background: var(--danger-color);
}

.text-danger {
    color: var(--danger-color);
    font-weight: 600;
}

.text-success {
    color: var(--success-color);
    font-weight: 600;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pagination a {
    padding: 0.5rem 0.85rem;
    background: rgba(173, 216, 230, 0.4);
    border-radius: 8px;
    text-decoration: none;
    color: var(--theme-dark);
    font-weight: 600;
}

.pagination a.active {
    background: var(--theme-dark);
    color: #fff;
}

.app-footer {
    background: rgba(173, 216, 230, 0.35);
    padding: 1rem 0;
    text-align: center;
    color: var(--theme-dark);
    margin-top: 2rem;
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top, rgba(173, 216, 230, 0.65), rgba(95, 158, 160, 0.35));
}

.login-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 16px;
    width: min(400px, 100%);
    box-shadow: 0 18px 35px rgba(95, 158, 160, 0.45);
}

.login-card h1 {
    margin-top: 0;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--theme-dark);
}

.login-card .form-group:last-child {
    margin-bottom: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.dashboard-card {
    color: #fff;
    border-radius: 14px;
    padding: 1.75rem;
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card-1 {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 12px 24px rgba(52, 152, 219, 0.35);
}

.dashboard-card-1:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 28px rgba(52, 152, 219, 0.45);
}

.dashboard-card-2 {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 0 12px 24px rgba(46, 204, 113, 0.35);
}

.dashboard-card-2:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 28px rgba(46, 204, 113, 0.45);
}

.dashboard-card-3 {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    box-shadow: 0 12px 24px rgba(155, 89, 182, 0.35);
}

.dashboard-card-3:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 28px rgba(155, 89, 182, 0.45);
}

.dashboard-card-4 {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    box-shadow: 0 12px 24px rgba(231, 76, 60, 0.35);
}

.dashboard-card-4:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 28px rgba(231, 76, 60, 0.45);
}

.dashboard-card-5 {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    box-shadow: 0 12px 24px rgba(243, 156, 18, 0.35);
}

.dashboard-card-5:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 28px rgba(243, 156, 18, 0.45);
}

.dashboard-card h3 {
    margin: 0 0 0.75rem 0;
}

.dashboard-card p {
    margin: 0;
    opacity: 0.9;
}

/* Mobile responsive styles for table */
@media screen and (max-width: 768px) {
    .card {
        padding: 1rem;
    }
    
    .table-responsive {
        width: 100%;
    }
    
    table {
        font-size: 0.8rem;
        width: 100%;
        table-layout: fixed;
    }
    
    th,
    td {
        padding: 0.5rem 0.4rem;
        font-size: 0.75rem;
        word-break: break-word;
    }
    
    th:nth-child(1),
    td:nth-child(1) {
        width: 8%;
    }
    
    th:nth-child(2),
    td:nth-child(2) {
        width: 18%;
    }
    
    th:nth-child(3),
    td:nth-child(3) {
        width: 18%;
    }
    
    th:nth-child(4),
    td:nth-child(4) {
        width: 12%;
    }
    
    th:nth-child(5),
    td:nth-child(5) {
        width: 22%;
    }
    
    th:nth-child(6),
    td:nth-child(6) {
        width: 22%;
    }
    
    .status-badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
        white-space: nowrap;
    }
}

@media screen and (max-width: 480px) {
    table {
        font-size: 0.7rem;
    }
    
    th,
    td {
        padding: 0.4rem 0.3rem;
        font-size: 0.65rem;
    }
    
    th:nth-child(1),
    td:nth-child(1) {
        width: 10%;
    }
    
    th:nth-child(2),
    td:nth-child(2) {
        width: 20%;
    }
    
    th:nth-child(3),
    td:nth-child(3) {
        width: 20%;
    }
    
    th:nth-child(4),
    td:nth-child(4) {
        width: 15%;
    }
    
    th:nth-child(5),
    td:nth-child(5) {
        width: 17.5%;
    }
    
    th:nth-child(6),
    td:nth-child(6) {
        width: 17.5%;
    }
    
    .status-badge {
        padding: 0.2rem 0.4rem;
        font-size: 0.6rem;
    }
}


