/* S3 Data Center Checklist - Mobile-First Responsive CSS */

:root {
    --primary-color: #255171;
    --secondary-color: #4BBCBD;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 8px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: #fff;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a3d52 100%);
    color: white;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    height: 40px;
    width: auto;
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
}

.site-title {
    font-size: 1rem;
    font-weight: 600;
    display: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
}

.user-name {
    display: none;
}

.user-role {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

.logout-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.logout-btn:hover {
    background: #c82333;
}

/* Navigation Menu */
.nav-menu {
    background: white;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.menu-toggle {
    display: block;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
}

.menu-toggle::after {
    content: '▼';
    float: right;
    transition: transform 0.3s;
}

.menu-toggle.active::after {
    transform: rotate(180deg);
}

.menu-list {
    list-style: none;
    display: none;
    background: white;
}

.menu-list.active {
    display: block;
}

.menu-item {
    border-bottom: 1px solid var(--border-color);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-link {
    display: block;
    padding: 1rem 1.25rem;
    color: var(--dark-text);
    text-decoration: none;
    transition: background 0.2s;
}

.menu-link:hover {
    background: var(--light-bg);
}

.menu-link.active {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
}

.submenu {
    list-style: none;
    background: var(--light-bg);
    display: none;
}

.menu-item.has-submenu.active .submenu {
    display: block;
}

.submenu-link {
    display: block;
    padding: 0.75rem 1.25rem 0.75rem 2.5rem;
    color: var(--dark-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.submenu-link:hover {
    background: #e9ecef;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.page-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1a3d52;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-add {
    background: var(--secondary-color);
    color: white;
    margin-bottom: 1rem;
}

.btn-add:hover {
    background: #3aa3a4;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-text);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 81, 113, 0.1);
}

.form-control::placeholder {
    color: #adb5bd;
}

/* Table */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.875rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--light-bg);
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
}

.table tr:hover {
    background: var(--light-bg);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: var(--light-bg);
    padding: 1.5rem 1rem;
    margin-top: 3rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a3d52 100%);
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo img {
    max-width: 180px;
    height: auto;
}

.login-title {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Responsive Design - Tablets and Up */
@media (min-width: 768px) {
    .site-title {
        display: block;
        font-size: 1.125rem;
    }
    
    .user-name {
        display: block;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .menu-list {
        display: flex !important;
        flex-direction: column;
    }
    
    .table {
        font-size: 1rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .btn-add {
        width: auto;
        display: inline-block;
    }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
    .header-container {
        padding: 0 1rem;
    }
    
    .nav-menu {
        position: sticky;
        top: 72px;
    }
    
    .menu-list {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .menu-item {
        border-bottom: none;
        border-right: 1px solid var(--border-color);
        position: relative;
    }
    
    .menu-item:last-child {
        border-right: none;
    }
    
    .menu-link {
        padding: 1rem 1.5rem;
    }
    
    .submenu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 200px;
        box-shadow: var(--shadow-lg);
        background: white;
        z-index: 100;
    }
    
    .menu-item.has-submenu:hover .submenu {
        display: block;
    }
    
    .submenu-link {
        padding: 0.75rem 1.25rem;
    }
}

/* Print Styles */
@media print {
    .header, .nav-menu, .footer, .btn, .table-actions {
        display: none;
    }
    
    .container {
        padding: 0;
    }
}