/*
 * Email Monitor - Global Styles
 * EmployInsure Green Theme
 */

/* ========================================
   VARIABLES & COLORS
   ======================================== */
:root {
    /* EmployInsure Brand Colors */
    --primary-green: #00d084;
    --primary-green-dark: #00b372;
    --primary-green-darker: #059669;
    --emphasis-color: #105F36;
    --accent-green: #10b981;
    --accent-green-light: #7bdcb5;

    /* Neutrals */
    --dark-green: #0f3d30;
    --dark-green-deep: #0a1f1a;
    --gray-50: #f8f9fa;
    --gray-100: #f8fafc;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1a202c;
    --gray-900: #0f172a;

    /* Semantic Colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ========================================
   BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--gray-800);
    letter-spacing: -0.3px;
}

h1 { font-size: 24px; letter-spacing: -0.5px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }

/* ========================================
   BUTTONS
   ======================================== */
button {
    background: var(--emphasis-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Fira Sans', sans-serif;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

button:hover {
    background: #0c4728;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

button:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-green {
    background: var(--emphasis-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-green:hover {
    background: #0c4728;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-green:active {
    transform: translateY(0);
}

.btn-red {
    background: var(--color-error);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-red:hover {
    background: #dc2626;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-red:active {
    transform: translateY(0);
}

/* ========================================
   FORM INPUTS
   ======================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea {
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Fira Sans', sans-serif;
    transition: all 0.2s ease;
    width: 100%;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.1);
}

/* ========================================
   TABLES
   ======================================== */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    background: var(--gray-100);
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    font-size: 14px;
    color: var(--gray-700);
}

tbody tr {
    cursor: pointer;
    transition: all 0.15s ease;
}

tbody tr:hover {
    background: var(--gray-100);
    box-shadow: 0 0 0 1px #e2e8f0 inset;
}

/* ========================================
   CARDS
   ======================================== */
.card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray-500);
    font-size: 15px;
}

.error {
    background: #fef2f2;
    color: #991b1b;
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid var(--color-error);
    font-size: 14px;
}

/* ========================================
   MODAL
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 32px;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 12px;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

/* ========================================
   FORM GROUPS
   ======================================== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 500;
    font-size: 14px;
    color: #374151;
}

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

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
