/* Mobile-First Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Container */
.container {
    width: 100%;
    padding: 15px;
    margin: 0 auto;
}

/* Navbar */
.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.username {
    font-size: 0.9rem;
    display: none;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    font-size: 0.95rem;
}

.alert-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background-color: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.text-muted {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.login-info {
    margin-top: 20px;
    padding: 15px;
    background-color: var(--light-color);
    border-radius: 6px;
    font-size: 0.85rem;
}

.login-info code {
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-warning {
    background-color: var(--warning-color);
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-logout {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-logout:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-group {
    display: flex;
    gap: 6px;
}

/* Page Header */
.page-header {
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 1.6rem;
    color: var(--dark-color);
}

/* Action Bar */
.action-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-form {
    display: flex;
    gap: 8px;
    flex: 1;
}

.search-input {
    flex: 1;
}

/* Table */
.table-responsive {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    display: none;
}

.table tbody tr {
    display: block;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody td:last-child {
    border-bottom: none;
}

.table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--dark-color);
}

.table tbody td:nth-child(5) {
    font-weight: 600;
    color: var(--success-color);
}

/* Form Container */
.form-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions .btn {
    flex: 1;
}

/* Empty State */
.empty-state {
    background: white;
    padding: 40px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.empty-state p {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

/* Tablet & Desktop */
@media (min-width: 768px) {
    .container {
        max-width: 1200px;
        padding: 20px;
    }
    
    .username {
        display: inline;
    }
    
    .login-box {
        padding: 35px;
    }
    
    .action-bar {
        flex-direction: row;
        align-items: center;
    }
    
    .search-form {
        max-width: 400px;
    }
    
    /* Table Desktop View */
    .table thead {
        display: table-header-group;
        background-color: var(--light-color);
    }
    
    .table thead th {
        padding: 12px 15px;
        text-align: left;
        font-weight: 600;
        color: var(--dark-color);
        border-bottom: 2px solid var(--border-color);
    }
    
    .table tbody tr {
        display: table-row;
        margin-bottom: 0;
        border: none;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
    }
    
    .table tbody tr:hover {
        background-color: var(--light-color);
    }
    
    .table tbody td {
        display: table-cell;
        border-bottom: none;
        vertical-align: middle;
    }
    
    .table tbody td::before {
        content: none;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
}

@media (min-width: 1024px) {
    .form-container {
        max-width: 600px;
        margin: 0 auto;
    }
}
