/* ============================================
   MAIN.CSS - Complete Design System
   Endüstri Vadisi | Fihrist Application
   ============================================ */

/* ============================================
   CSS VARIABLES & THEMES
   ============================================ */

:root {
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme='dark'] {
    --bg-primary: #0b0c10;
    --bg-secondary: #1f2833;
    --bg-tertiary: #12161f;
    --bg-card: rgba(31, 40, 51, 0.7);
    --bg-glass: rgba(18, 22, 31, 0.6);
    --border-color: rgba(0, 210, 255, 0.15);
    --border-glow: rgba(108, 99, 255, 0.3);
    --text-primary: #f5f7fa;
    --text-secondary: #c5a880; /* Warm gold/bronze secondary */
    --text-muted: #8b9bb4;
    --accent-primary: #6c63ff;
    --accent-secondary: #00d2ff;
    --accent-gradient: linear-gradient(135deg, #6c63ff, #00d2ff);
    
    --success: #00e676;
    --warning: #ffab00;
    --error: #ff5252;
    --info: #00e5ff;
    
    --customer-color: #00e676;
    --supplier-color: #00d2ff;
    --partner-color: #e040fb;
    --other-color: #90a4ae;

    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(0, 210, 255, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

[data-theme='light'] {
    --bg-primary: #f4f6f9;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eaedf2;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-glass: rgba(244, 246, 249, 0.7);
    --border-color: rgba(108, 99, 255, 0.15);
    --border-glow: rgba(108, 99, 255, 0.25);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent-primary: #6c63ff;
    --accent-secondary: #00d2ff;
    --accent-gradient: linear-gradient(135deg, #6c63ff, #00d2ff);
    
    --success: #00c853;
    --warning: #ff9100;
    --error: #ff3d00;
    --info: #00b0ff;
    
    --customer-color: #00c853;
    --supplier-color: #00b0ff;
    --partner-color: #d500f9;
    --other-color: #78909c;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 15px rgba(108, 99, 255, 0.1);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   BASE & RESET STYLES
   ============================================ */

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    line-height: 1.5;
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

/* ============================================
   GLASSMORPHISM & GLOWS
   ============================================ */

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-panel:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* ============================================
   BUTTONS & INPUTS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(108, 99, 255, 0.35);
    transform: translateY(-1px);
}

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

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-muted);
}

.btn-danger {
    background: rgba(255, 82, 82, 0.1);
    color: var(--error);
    border: 1px solid rgba(255, 82, 82, 0.3);
}

.btn-danger:hover {
    background: var(--error);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 82, 82, 0.2);
}

.btn-icon {
    padding: 0.5rem;
    border-radius: 50%;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Inputs */
.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 0.875rem;
    padding: 0.625rem 0.875rem;
    width: 100%;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.15);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b9bb4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.25rem;
}

/* Checkbox Toggle */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.toggle-input {
    display: none;
}

.toggle-slider {
    width: 38px;
    height: 20px;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    position: relative;
    transition: background-color var(--transition-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--text-muted);
    top: 2px;
    left: 2px;
    transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.toggle-input:checked + .toggle-slider {
    background-color: rgba(0, 210, 255, 0.2);
    border-color: var(--accent-secondary);
}

.toggle-input:checked + .toggle-slider::before {
    transform: translateX(18px);
    background-color: var(--accent-secondary);
}

/* ============================================
   APP LAYOUT & WRAPPERS
   ============================================ */

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
    gap: 1.5rem;
}

/* ============================================
   HEADER COMPONENT
   ============================================ */

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    margin-bottom: 0.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.25rem;
}

.brand-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text span {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.user-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.user-badge-admin {
    background: rgba(108, 99, 255, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(108, 99, 255, 0.3);
}

.user-badge-user {
    background: rgba(0, 210, 255, 0.15);
    color: var(--accent-secondary);
    border: 1px solid rgba(0, 210, 255, 0.3);
}

.theme-switcher {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.theme-switcher:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    text-align: center;
}

.login-logo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(108, 99, 255, 0.3);
}

.login-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.login-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.login-card form {
    text-align: left;
}

/* ============================================
   STATS COMPONENT
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

/* ============================================
   FILTER & SEARCH BAR
   ============================================ */

.control-panel {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.search-input-wrapper {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-input-wrapper input {
    padding-left: 2.5rem;
}

.search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
}

.filter-select {
    width: 160px;
    min-width: 140px;
}

.action-buttons-group {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
}

/* ============================================
   CONTACT GRID & CARDS
   ============================================ */

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}

.contact-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.contact-avatar-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.contact-avatar {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-secondary);
}

.contact-name-title {
    display: flex;
    flex-direction: column;
}

.contact-name {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.2;
}

.contact-job-title {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.contact-company {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Badge Pills */
.pill-badge {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
}

.badge-customer {
    background: rgba(0, 230, 118, 0.1);
    color: var(--customer-color);
    border: 1px solid rgba(0, 230, 118, 0.25);
}

.badge-supplier {
    background: rgba(0, 210, 255, 0.1);
    color: var(--supplier-color);
    border: 1px solid rgba(0, 210, 255, 0.25);
}

.badge-partner {
    background: rgba(224, 64, 251, 0.1);
    color: var(--partner-color);
    border: 1px solid rgba(224, 64, 251, 0.25);
}

.badge-other {
    background: rgba(144, 164, 174, 0.1);
    color: var(--other-color);
    border: 1px solid rgba(144, 164, 174, 0.25);
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.contact-info-item svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.contact-info-item a {
    color: var(--text-primary);
}

.contact-info-item a:hover {
    color: var(--accent-secondary);
}

/* Call Button Box (Tıklanabilir Arama) */
.dialer-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.btn-dial {
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--accent-secondary);
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
}

.btn-dial:hover {
    background-color: rgba(0, 210, 255, 0.1);
    border-color: var(--accent-secondary);
    color: var(--text-primary);
}

/* Card Action Overlays */
.contact-actions {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    gap: 0.375rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.contact-card:hover .contact-actions {
    opacity: 1;
}

.btn-action-overlay {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.375rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-action-overlay:hover {
    color: var(--text-primary);
    border-color: var(--accent-secondary);
}

.btn-action-overlay.delete:hover {
    color: var(--error);
    border-color: var(--error);
    background-color: rgba(255, 82, 82, 0.1);
}

.contact-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.25rem;
}

.tag-pill {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

/* ============================================
   MODALS
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    max-width: 600px;
    width: 100%;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.modal-content.wide {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h3 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-close:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(0, 0, 0, 0.15);
}

/* Modal form grid */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* File Upload input */
.file-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    background-color: var(--bg-tertiary);
    transition: all var(--transition-fast);
}

.file-upload-zone:hover {
    border-color: var(--accent-secondary);
    background-color: rgba(0, 210, 255, 0.02);
}

.file-upload-zone p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.file-upload-preview {
    margin-top: 1rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    position: relative;
    max-height: 200px;
    display: flex;
    justify-content: center;
}

.file-upload-preview img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.file-upload-preview-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Contact Details Specifics */
.detail-card-preview {
    width: 100%;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    background-color: var(--bg-tertiary);
}

.detail-card-preview img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    max-height: 400px;
}

.detail-notes-box {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 1rem;
}

.qr-box-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-top: 1rem;
}

.qr-image {
    padding: 12px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   ADMIN INTERFACES
   ============================================ */

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-nav-item {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-fast);
}

.admin-nav-item:hover, .admin-nav-item.active {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-left: 3px solid var(--accent-secondary);
    padding-left: calc(1rem - 3px);
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

th, td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    font-weight: 600;
    color: var(--text-muted);
    background-color: rgba(0, 0, 0, 0.15);
}

tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

.status-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background-color: rgba(0, 230, 118, 0.1);
    color: var(--success);
    border: 1px solid rgba(0, 230, 118, 0.2);
}

.status-inactive {
    background-color: rgba(255, 82, 82, 0.1);
    color: var(--error);
    border: 1px solid rgba(255, 82, 82, 0.2);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 380px;
    width: 100%;
}

.toast {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    backdrop-filter: blur(10px);
}

.toast-success {
    border-color: rgba(0, 230, 118, 0.3);
}

.toast-error {
    border-color: rgba(255, 82, 82, 0.3);
}

.toast-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.toast-message {
    font-size: 0.8125rem;
    font-weight: 500;
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   RESPONSIVE DESIGN (MOBILE-FIRST)
   ============================================ */

@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
        gap: 1rem;
    }
    
    .app-header {
        padding: 0.75rem 1rem;
    }

    .brand-text h1 {
        font-size: 1.125rem;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .user-info span {
        display: none; /* Hide full name on small screens */
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .control-panel {
        padding: 1rem;
    }

    .search-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input-wrapper {
        min-width: 100%;
    }

    .filter-select {
        width: 100%;
    }

    .action-buttons-group {
        margin-left: 0;
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .action-buttons-group .btn {
        width: 100%;
    }

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

    .contact-card {
        padding: 1.25rem;
    }

    .contact-actions {
        opacity: 1; /* Keep buttons visible on mobile where there is no hover */
        right: 0.75rem;
        bottom: 0.75rem;
    }

    .modal-overlay {
        padding: 0.75rem;
    }

    .modal-content {
        max-height: calc(100vh - 1.5rem);
    }

    .modal-body {
        padding: 1rem;
    }

    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .admin-nav-item {
        white-space: nowrap;
    }
}
