/* KeyBox2 Stylesheet */

:root {
    --primary: #1f3a60;
    --primary-dark: #162943;
    --success: #1f7a4d;
    --danger: #c43b3b;
    --warning: #d3871f;
    --info: #0f4c81;
    --light: #f2f4f7;
    --dark: #1b2430;
    --border: #d7dbe2;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #eef1f5;
    color: #1f2933;
    line-height: 1.6;
}

/* Layout */
.layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 20px;
}

/* Navigation */
.navbar {
    background: var(--dark);
    color: white;
    padding: 16px 20px;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 20px;
    margin: 0;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    flex: 1;
    margin-left: 40px;
}

.nav-menu a {
    color: #e5e7eb;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.nav-menu a:hover {
    color: white;
    border-color: #4b5563;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-logout {
    background: #2d3748;
    color: white;
    border: 1px solid #4b5563;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s, border-color 0.2s;
}

.btn-logout:hover {
    background: #1f2937;
    border-color: #6b7280;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 28px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

/* Typography */
h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
}

h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #555;
}

h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #666;
}

/* Forms */
.form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-info {
    background: var(--info);
    color: white;
}

.btn-info:hover {
    background: #0056b3;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.table thead {
    background: #f8f9fa;
    border-bottom: 2px solid var(--border);
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

.table tr:hover {
    background: #f9f9f9;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-error,
.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Page Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    margin: 0;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .nav-menu {
        order: 3;
        flex-basis: 100%;
        margin-left: 0;
        margin-top: 15px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .nav-menu a {
        font-size: 14px;
    }

    .container {
        padding: 20px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header .btn {
        align-self: flex-start;
        margin-top: 10px;
    }

    .table {
        font-size: 14px;
    }

    .table th,
    .table td {
        padding: 10px;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.text-muted {
    color: #6c757d;
}

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

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