/* HostAqui SMTP Server - CSS Style
   Author: Antigravity
   Modern Dark Aesthetic, Sleek Gradients, and Glassmorphism
*/

:root {
    --bg-dark: #0b0f19;
    --bg-card: rgba(17, 24, 39, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.35);
    --primary-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --primary-gradient-hover: linear-gradient(135deg, #22d3ee 0%, #2563eb 100%);
    
    --accent: #06b6d4;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);
    
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.15);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes floatCircle {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.animate-fade-in {
    animation: fadeIn 0.4s var(--transition-smooth) forwards;
}

/* Background Glowing Circles */
.glow-bg-circle-1, .glow-bg-circle-2 {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.45;
}

.glow-bg-circle-1 {
    top: 15%;
    left: 20%;
    background: radial-gradient(circle, var(--accent) 0%, rgba(6, 182, 212, 0) 70%);
    animation: floatCircle 8s infinite ease-in-out;
}

.glow-bg-circle-2 {
    bottom: 15%;
    right: 20%;
    background: radial-gradient(circle, var(--primary) 0%, rgba(59, 130, 246, 0) 70%);
    animation: floatCircle 10s infinite ease-in-out-reverse;
}

/* Login Page Specific Layout */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
}

.login-wrapper {
    width: 100%;
    max-width: 440px;
    padding: 20px;
    z-index: 10;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-premium), var(--shadow-glow);
    text-align: center;
    animation: fadeIn 0.5s var(--transition-smooth) forwards;
}

.login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

.brand-host {
    color: var(--text-primary);
}

.brand-aqui {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    display: block;
    margin-top: -4px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 30px;
}

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

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input, .form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 15px;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
}

.input-wrapper input {
    padding-left: 44px;
}

.input-wrapper input:focus, .form-control:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.input-wrapper input:focus + .input-icon {
    color: var(--accent);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
}

.btn-primary:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 24px;
    border: 1px solid transparent;
}

.alert-danger {
    background-color: var(--danger-bg);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.alert-success {
    background-color: var(--success-bg);
    border-color: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}

.alert-warning {
    background-color: var(--warning-bg);
    border-color: rgba(245, 158, 11, 0.2);
    color: #fde68a;
}

.login-footer {
    margin-top: 30px;
    font-size: 12px;
    color: var(--text-muted);
}

/* Dashboard Layout */
.dashboard-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-nav {
    background: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.nav-username {
    font-size: 14px;
    color: var(--text-secondary);
}

.nav-logout {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-logout:hover {
    color: var(--danger);
}

.dashboard-main {
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 24px;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-title h1 {
    font-size: 28px;
    font-weight: 700;
}

.dashboard-title p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Analytics Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-fast);
}

.stat-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
}

.stat-info h3 {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.primary {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
}

.stat-icon.accent {
    background: rgba(6, 182, 212, 0.15);
    color: var(--accent);
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

/* Panels and Tables */
.dashboard-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow-premium);
    margin-bottom: 24px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-pb: 14px;
    padding-bottom: 14px;
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
}

/* Custom Table Design */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table-custom th, .table-custom td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-custom th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.01);
}

.table-custom tbody tr {
    transition: var(--transition-fast);
}

.table-custom tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.table-custom td {
    font-size: 14px;
    color: var(--text-primary);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: var(--success-bg);
    color: #34d399;
}

.badge-danger {
    background: var(--danger-bg);
    color: #f87171;
}

.badge-warning {
    background: var(--warning-bg);
    color: #fbbf24;
}

/* Domain Text & Key Copies */
.domain-text {
    font-family: monospace;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 6px;
    border-radius: 6px;
    color: var(--text-secondary);
}

.license-key-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.license-key-text {
    font-family: monospace;
    font-weight: 600;
    color: var(--accent);
}

.btn-icon-only {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-only:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Live Logs Feed */
.logs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

.log-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 11px;
}

.log-action {
    font-weight: 600;
    color: var(--text-primary);
}

.log-action.success { color: var(--success); }
.log-action.failure { color: var(--danger); }

.log-details {
    color: var(--text-secondary);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium), 0 0 40px rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    padding: 30px;
    transform: translateY(-20px);
    transition: var(--transition-smooth);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 24px;
    transition: var(--transition-fast);
}

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

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* Inline Grid Actions */
.actions-cell {
    display: flex;
    gap: 8px;
}

/* Tooltip classes if needed */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(11, 15, 25, 0.95);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tooltip:hover::after {
    opacity: 1;
}

/* Extra Forms Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.empty-state svg {
    margin-bottom: 16px;
    color: var(--text-muted);
    opacity: 0.5;
}
.empty-state p {
    font-size: 14px;
}

/* Tab Navigation and Content */
.tab-navigation {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 10px 18px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 10px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn svg {
    opacity: 0.7;
    transition: var(--transition-fast);
}

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

.tab-btn:hover svg {
    opacity: 1;
}

.tab-btn.active {
    color: var(--accent);
    background: rgba(6, 182, 212, 0.1);
    font-weight: 600;
}

.tab-btn.active svg {
    opacity: 1;
    stroke: var(--accent);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}
