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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    min-height: 100vh;
    color: #1a1a1a;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo {
    font-size: 32px;
    font-weight: 700;
    color: #E31837;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.logo-image {
    height: 40px;
    width: auto;
}

.version {
    font-size: 0.75rem;
    color: rgba(227, 24, 55, 0.7);
    margin-left: 10px;
    font-weight: 400;
    padding: 4px 8px;
    background: rgba(227, 24, 55, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(227, 24, 55, 0.2);
}



.project-info {
    display: flex;
    align-items: center;
    gap: 24px;
}

.project-name {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    padding: 8px 16px;
    background: #f8f9ff;
    border-radius: 8px;
    border: 1px solid rgba(227, 24, 55, 0.1);
}

.project-select {
    padding: 12px 16px;
    border: 2px solid #E31837;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.project-select:focus {
    outline: none;
    border-color: #c41530;
    box-shadow: 0 0 0 3px rgba(227, 24, 55, 0.1);
}

.controls {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 14px 40px 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #E31837;
    background: white;
    box-shadow: 0 0 0 3px rgba(227, 24, 55, 0.1);
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.clear-search-btn:hover {
    background: rgba(227, 24, 55, 0.1);
    color: #E31837;
}

.btn {
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-success {
    background: linear-gradient(135deg, #E31837, #c41530);
    color: white;
    box-shadow: 0 4px 16px rgba(227, 24, 55, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(227, 24, 55, 0.4);
}

.btn:not(.btn-success):not(.btn-cancel) {
    background: white;
    color: #E31837;
    border: 2px solid #E31837;
}

.btn:hover {
    background: #E31837;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(227, 24, 55, 0.3);
}

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

.btn-cancel:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: 2px solid #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.view-toggle {
    margin-right: 1rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
}

.action-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #E31837, #ff4d6d);
}

.action-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.action-point {
    background: linear-gradient(135deg, #E31837, #c41530);
    color: white;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.action-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.4;
}

.action-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #666;
}

.latest-updates {
    background: linear-gradient(135deg, #f8f9ff, #e8f2ff);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid rgba(227, 24, 55, 0.1);
}

.latest-updates h4 {
    font-size: 12px;
    color: #E31837;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.latest-updates ul {
    list-style: none;
    padding: 0;
}

.latest-updates li {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
    padding-left: 16px;
    position: relative;
}

.latest-updates li::before {
    content: '→';
    color: #E31837;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.action-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status {
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status.open {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.status.closed {
    background: linear-gradient(135deg, #f8d7da, #f1b0b7);
    color: #721c24;
}

.status.in-progress {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.status.on-hold {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

.priority {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.priority.high {
    color: #E31837;
}

.priority.medium {
    color: #fd7e14;
}

.priority.low {
    color: #28a745;
}

.priority.critical {
    color: #dc3545;
    font-weight: 700;
}

.close-btn {
    background: linear-gradient(135deg, #E31837, #c41530);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(227, 24, 55, 0.3);
}

.close-btn:hover {
    background: linear-gradient(135deg, #c41530, #a01228);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(227, 24, 55, 0.4);
}

.loading {
    text-align: center;
    padding: 80px 20px;
    color: #666;
    font-size: 18px;
}

.error {
    color: #E31837;
    background: linear-gradient(135deg, #f8d7da, #f1b0b7);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid rgba(227, 24, 55, 0.2);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, #E31837, #c41530);
    color: white;
    padding: 24px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s ease;
}

.close:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

.modal-body {
    padding: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #fafafa;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #E31837;
    background: white;
    box-shadow: 0 0 0 3px rgba(227, 24, 55, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

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

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 32px;
}

/* Authentication Styles */
.auth-step {
    text-align: center;
}

.auth-step p {
    margin-bottom: 20px;
    color: #666;
}

.auth-step input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background: #fafafa;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.auth-step input:focus {
    outline: none;
    border-color: #E31837;
    background: white;
    box-shadow: 0 0 0 3px rgba(227, 24, 55, 0.1);
}

.auth-help {
    margin-top: 16px;
    font-size: 14px;
    color: #666;
}

.auth-help a {
    color: #E31837;
    text-decoration: none;
    font-weight: 500;
}

.auth-help a:hover {
    text-decoration: underline;
}

.modal-logo {
    height: 24px;
    width: auto;
    margin-left: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-email {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.btn-logout {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #d32f2f;
}

.btn-primary {
    background: linear-gradient(135deg, #E31837, #c41530);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #c41530, #a01228);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(227, 24, 55, 0.3);
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 14px;
    border: 1px solid #ffcdd2;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #E31837;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 24px;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification {
    animation: slideIn 0.3s ease-out;
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1001;
}

.notification.success {
    background-color: #10b981;
}

.notification.error {
    background-color: #ef4444;
}

.notification.info {
    background-color: #3b82f6;
}

/* User Management Styles */
.user-management-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid #e5e7eb;
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.stat-card p {
    color: #6b7280;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.user-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.user-card.inactive {
    opacity: 0.7;
    border-color: #d1d5db;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.user-info h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    color: #1f2937;
}

.user-status {
    margin-left: auto;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.user-status.active {
    background-color: #d1fae5;
    color: #065f46;
}

.user-status.inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

.user-details {
    margin-bottom: 15px;
}

.user-role {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.user-role.role-admin {
    background-color: #fef3c7;
    color: #92400e;
}

.user-role.role-manager {
    background-color: #dbeafe;
    color: #1e40af;
}

.user-role.role-user {
    background-color: #f3f4f6;
    color: #374151;
}

.user-projects {
    font-size: 0.9rem;
    color: #4b5563;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.no-users {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-size: 1.1rem;
}

.no-projects {
    color: #6b7280;
    font-style: italic;
    padding: 10px 0;
}

.page-title {
    flex: 1;
    text-align: center;
}

.page-title h1 {
    margin: 0;
    color: #1f2937;
    font-size: 1.5rem;
    font-weight: 600;
}

.project-access-section {
    margin-top: 10px;
}

.projects-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px;
    margin-top: 10px;
    background-color: #f9fafb;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    order: -1;
}

.user-delete-info {
    background-color: #f9fafb;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin: 15px 0;
}

.user-summary {
    text-align: center;
}

.user-summary strong {
    display: block;
    font-size: 1.1rem;
    color: #1f2937;
    margin-bottom: 5px;
}

.warning {
    color: #dc2626;
    font-weight: 600;
    text-align: center;
    margin-top: 15px;
}