/* Brinstar Framework - Core Styles */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* Top Navigation Band */
.top-nav {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    min-height: 60px;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.nav-brand a {
    color: #2c3e50;
    text-decoration: none;
}

.nav-brand a:hover {
    color: #3498db;
}

/* Main Navigation */
.main-nav {
    flex: 1;
    margin: 0 2rem;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    color: #495057;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: block;
    white-space: nowrap;
}

.nav-item > a:hover {
    background-color: #e9ecef;
    color: #2c3e50;
}

.nav-item.active > a {
    background-color: #3498db;
    color: white;
}

/* Dropdown Navigation */
.nav-item.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 1001;
}

.dropdown-menu ul {
    flex-direction: column;
    gap: 0;
}

.dropdown-menu .nav-item {
    width: 100%;
}

.dropdown-menu .nav-item > a {
    padding: 0.75rem 1rem;
    border-radius: 0;
    border-bottom: 1px solid #f8f9fa;
}

.dropdown-menu .nav-item:last-child > a {
    border-bottom: none;
}

/* User Navigation */
.user-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    font-size: 0.9rem;
    color: #6c757d;
}

.login-btn, .logout-btn {
    background: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.login-btn:hover, .logout-btn:hover {
    background: #2980b9;
}

/* Breadcrumb Band */
.breadcrumb-band {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0.5rem 0;
}

.breadcrumbs {
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: #3498db;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
    color: #6c757d;
}

.breadcrumbs .current {
    color: #495057;
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

.main-content h1, .main-content h2, .main-content h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.main-content h1 {
    font-size: 2.5rem;
    font-weight: 300;
}

.main-content h2 {
    font-size: 2rem;
    font-weight: 400;
}

.main-content h3 {
    font-size: 1.5rem;
    font-weight: 500;
}

.main-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Footer Band */
.footer-band {
    background: #2c3e50;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
    color: #ecf0f1;
}

.footer-section p {
    margin-bottom: 0.5rem;
    color: #bdc3c7;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: #3498db;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #2c3e50;
}

.modal-header .close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
    line-height: 1;
}

.modal-header .close:hover {
    color: #495057;
}

.modal-body {
    padding: 1.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

button, .btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease;
}

button:hover, .btn:hover {
    background: #2980b9;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #e74c3c;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table th, table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

table tr:hover {
    background: #f8f9fa;
}

/* Alert Messages */
.error-message, .success-message, .info-message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.info-message {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Responsive Design */
@media (max-width: 768px) {
    .top-nav .container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-brand {
        order: 1;
    }
    
    .main-nav {
        order: 3;
        margin: 0;
        width: 100%;
    }
    
    .main-nav ul {
        justify-content: center;
    }
    
    .user-nav {
        order: 2;
    }
    
    .main-content h1 {
        font-size: 2rem;
    }
    
    .main-content h2 {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    button, .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-item {
        width: 100%;
        text-align: center;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .main-content h1 {
        font-size: 1.75rem;
    }
}