/* Reliagility App - Modern Glassmorphism Design */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glassmorphism container */
.glass-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    padding: 40px;
    margin: 20px auto;
    max-width: 500px;
    color: white;
}

.admin-glass-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    padding: 30px;
    margin: 20px 20px 2px 20px;
    color: white;
    min-height: calc(100vh - 92px);
}

/* Login Form Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.login-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}
/* Button Styles */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-danger {
    background: linear-gradient(45deg, #dc3545, #e83e8c);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-warning {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    color: #212529;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

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

.btn-block {
    width: 100%;
    margin-bottom: 15px;
}

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

/* Table Styles */
.table-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    overflow-x: auto;
    margin-top: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.table th,
.table td {
    padding: 15px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.table th {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}
/* Badge Styles */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-admin {
    background: linear-gradient(45deg, #dc3545, #e83e8c);
    color: white;
}

.badge-user {
    background: linear-gradient(45deg, #007bff, #6f42c1);
    color: white;
}

.badge-active {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.badge-inactive {
    background: linear-gradient(45deg, #6c757d, #495057);
    color: white;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.user-info {
    text-align: right;
}

.user-info h3 {
    margin: 0;
    font-size: 1.2rem;
}

.user-info p {
    margin: 5px 0 0 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    margin: 20px auto;
    padding: 0;
    width: 100%;
    max-width: 450px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    color: white;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.modal-body {
    padding: 20px;
    flex: 1;
    min-height: 0;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: right;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 0 0 15px 15px;
}

.close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
}

.close:hover {
    opacity: 1;
}

/* Alert Styles */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.alert-success {
    background: rgba(40, 167, 69, 0.2);
    border-color: rgba(40, 167, 69, 0.3);
    color: #d4edda;
}

.alert-error {
    background: rgba(220, 53, 69, 0.2);
    border-color: rgba(220, 53, 69, 0.3);
    color: #f8d7da;
}

.alert-info {
    background: rgba(23, 162, 184, 0.2);
    border-color: rgba(23, 162, 184, 0.3);
    color: #d1ecf1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .glass-container {
        margin: 10px;
        padding: 20px;
    }
    
    .admin-glass-container {
        margin: 10px;
        padding: 15px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .table-container {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }
.flex { display: flex; }
.gap-10 { gap: 10px; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
/* Compact Action Buttons */
.btn-compact {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 6px;
    margin: 2px;
    min-width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-edit { background: rgba(102, 126, 234, 0.2); border-color: rgba(102, 126, 234, 0.4); }
.btn-edit:hover { background: rgba(102, 126, 234, 0.3); }

.btn-toggle { background: rgba(255, 193, 7, 0.2); border-color: rgba(255, 193, 7, 0.4); }
.btn-toggle:hover { background: rgba(255, 193, 7, 0.3); }

.btn-invite { background: rgba(40, 167, 69, 0.2); border-color: rgba(40, 167, 69, 0.4); }
.btn-invite:hover { background: rgba(40, 167, 69, 0.3); }

.btn-delete { background: rgba(220, 53, 69, 0.2); border-color: rgba(220, 53, 69, 0.4); }
.btn-delete:hover { background: rgba(220, 53, 69, 0.3); }

/* Main Action Button */
.btn-main {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-main:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Tooltip Styles */
.tooltip {
    position: relative !important;
}

/* Prevent child elements from blocking hover */
.tooltip * {
    pointer-events: none !important;
}

.tooltip::before {
    content: attr(data-tooltip) !important;
    position: absolute !important;
    bottom: calc(100% + 10px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(0, 0, 0, 0.95) !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
    z-index: 99999 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    pointer-events: none !important;
}

.tooltip::after {
    content: '' !important;
    position: absolute !important;
    bottom: calc(100% + 5px) !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border: 5px solid transparent !important;
    border-top-color: rgba(0, 0, 0, 0.95) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
    z-index: 99999 !important;
    pointer-events: none !important;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Icon styles */
.icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    pointer-events: none !important;
}

.icon::before {
    pointer-events: none !important;
}

.icon-edit::before { content: '✏️'; }
.icon-toggle::before { content: '🔄'; }
.icon-invite::before { content: '📧'; }
.icon-delete::before { content: '🗑️'; }
.icon-add::before { content: '👤'; }

/* Action column spacing */
.actions-cell {
    white-space: nowrap;
}

.actions-cell .btn-compact {
    margin: 0 2px;
}

/* Responsive Modal Adjustments */
@media screen and (max-height: 600px) {
    .modal {
        padding: 5px;
    }
    
    .modal-content {
        margin: 10px auto;
        max-width: 400px;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 12px 15px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    .form-control {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

@media screen and (max-height: 500px) {
    .modal-content {
        margin: 5px auto;
    }
    
    .modal-header {
        padding: 10px 12px;
    }
    
    .modal-body {
        padding: 12px;
    }
    
    .modal-footer {
        padding: 10px 12px;
    }
    
    .form-group {
        margin-bottom: 8px;
    }
    
    .modal-footer .btn {
        padding: 6px 12px;
        font-size: 0.85rem;
        min-width: 60px;
    }
}

@media screen and (max-width: 480px) {
    .modal {
        padding: 5px;
    }
    
    .modal-content {
        max-width: none;
        margin: 10px;
    }
}

/* Form adjustments for better spacing */
.form-group {
    margin-bottom: 12px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.6);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Ensure buttons are always visible */
.modal-footer .btn {
    margin-left: 8px;
    min-width: 70px;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.modal-footer .btn:first-child {
    margin-left: 0;
}
