/* Global Styles - Shared across all pages */

/* Modern CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #16a34a;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background-color: #f5f5f7;
    --surface-color: #ffffff;
    --surface-hover: #f5f5f7;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --gradient-success: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color) !important;
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    margin: 0;
    padding: 0;
}

/* Modern Navbar */
.navbar {
    background: linear-gradient(135deg, #007bff, #0056b3);
    backdrop-filter: blur(10px);
    padding: 15px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
}

.navbar .title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    transition: color 0.2s ease;
}

.navbar .title:hover {
    color: #e3f2fd;
}

/* Dashboard Button Navigation */
.title-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dashboard-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.dashboard-btn i {
    font-size: 11px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    box-shadow: var(--shadow-sm);
}

.user-avatar.admin {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: bold;
    color: white;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: #e3f2fd;
    text-transform: uppercase;
}

.admin-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    margin-left: 5px;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #c82333;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 24px;
    min-height: calc(100vh - 120px);
}

/* Typography */
h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* Modern Buttons */
.button {
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.button.primary {
    background: var(--primary-color);
    color: white;
}

.button.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.button.secondary {
    background: var(--secondary-color);
    color: white;
}

.button.secondary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    background-color: var(--surface-color);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Dashboard Controls */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.filter {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-color);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.filter i {
    color: var(--text-muted);
}

.filter select {
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
}

/* Modern Project Cards */
.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.project-card h2 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.project-card p {
    margin: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.project-card .status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 12px 0;
}

.project-card .status.planning {
    background: #fef3c7;
    color: #92400e;
}

.project-card .status.in-progress {
    background: #dbeafe;
    color: #1e40af;
}

.project-card .status.completed {
    background: #d1fae5;
    color: #065f46;
}

.project-card .view-details,
.project-card .delete-project {
    margin: 12px 8px 0 0;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.project-card .view-details {
    background: var(--primary-color);
    color: white;
}

.project-card .view-details:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.project-card .delete-project {
    background: var(--danger-color);
    color: white;
}

.project-card .delete-project:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Container Layouts */
.container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    max-height: 900px;
}

.top-half {
    display: flex;
    flex: 1;
    border-bottom: 2px solid var(--border-light);
    min-height: 400px;
}

.left-section, 
.right-section {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.left-section {
    border-right: 1px solid var(--border-light);
}

.bottom-half {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    main {
        margin: 16px auto;
        padding: 0 16px;
    }
    
    .navbar {
        padding: 12px 16px;
    }
    
    .navbar .title {
        font-size: 18px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .project-list {
        grid-template-columns: 1fr;
    }
    
    .top-half {
        flex-direction: column;
        border-bottom: none;
    }
    
    .left-section {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

@media (max-width: 480px) {
    main {
        margin: 12px auto;
        padding: 0 12px;
    }
    
    .navbar .title {
        font-size: 16px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .project-card {
        padding: 20px;
    }
}