/* =================================
   TouchOst Hosting - Custom Styles
   Unified Visual Identity for All Pages
   ================================= */

/* ===============================
   CSS Variables - Color Palette
   =============================== */
:root {
    --primary-color: #00d4ff;        /* Cyan Blue */
    --secondary-color: #0099cc;      /* Deep Blue */
    --success-color: #00ff88;        /* Tech Green */
    --dark-color: #1a1f3a;           /* Dark Blue */
    --light-bg: #f8f9fa;             /* Light Background */
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* Tech Gradients */
    --primary-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --dark-gradient: linear-gradient(135deg, var(--dark-color), #1a1f3a);
    --success-gradient: linear-gradient(135deg, var(--success-color), #00cc6a);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 35px rgba(0, 0, 0, 0.2);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
}

/* ===============================
   Global Base Styles
   =============================== */
body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--light-bg);
}

/* ===============================
   Header & Navigation Styles
   =============================== */
.admin-header,
.client-header,
.page-header {
    background: var(--dark-gradient);
    padding-top: 6.5rem;
    padding-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.admin-header::before,
.client-header::before,
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(0,212,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(0,255,136,0.15)"/><circle cx="40" cy="80" r="1.5" fill="rgba(0,212,255,0.08)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ===============================
   Content Areas
   =============================== */
.admin-content,
.client-content,
.page-content {
    padding-top: 2rem;
    padding-bottom: 2rem;
    min-height: 60vh;
}

/* ===============================
   Card Styles
   =============================== */
.admin-card,
.client-card,
.custom-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

.admin-card:hover,
.client-card:hover,
.custom-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.admin-card .card-header,
.client-card .card-header,
.custom-card .card-header {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.admin-card .card-body,
.client-card .card-body,
.custom-card .card-body {
    padding: 1.5rem;
}

/* ===============================
   Statistics Cards
   =============================== */
.stat-card {
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-card.bg-primary {
    background: var(--primary-gradient) !important;
}

.stat-card.bg-success {
    background: var(--success-gradient) !important;
}

.stat-card.bg-info {
    background: linear-gradient(135deg, #17a2b8, #138496) !important;
}

.stat-card.bg-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800) !important;
}

.stat-card.bg-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
}

.stat-card.bg-secondary {
    background: linear-gradient(135deg, #6c757d, #5a6268) !important;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.stat-content h3 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.stat-content p {
    font-size: 0.875rem;
    opacity: 0.85;
    margin-bottom: 0;
    font-weight: 500;
}

/* ===============================
   Button Styles
   =============================== */
.btn-custom-primary {
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-custom-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-custom-success {
    background: var(--success-gradient);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-custom-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* ===============================
   Table Styles
   =============================== */
.table-custom {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: none;
}

.table-custom thead th {
    background: var(--dark-gradient);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-custom tbody td {
    padding: 1rem 1.25rem;
    border-color: rgba(0, 0, 0, 0.05);
    vertical-align: middle;
    font-size: 0.9rem;
}

.table-custom tbody tr {
    transition: all 0.2s ease;
}

.table-custom tbody tr:hover {
    background-color: rgba(0, 212, 255, 0.05);
    transform: scale(1.01);
}

/* ===============================
   Form Styles
   =============================== */
.form-control-custom {
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background-color: var(--white);
}

.form-control-custom:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 212, 255, 0.25);
    background-color: var(--white);
}

.form-label-custom {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* ===============================
   Progress Bars
   =============================== */
.progress-custom {
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-small {
    height: 4px !important;
}

.progress-bar-custom {
    background: var(--primary-gradient);
    transition: width 0.6s ease;
    border-radius: 10px;
}

.progress-bar-100 { width: 100% !important; }
.progress-bar-67 { width: 67% !important; }
.progress-bar-45 { width: 45% !important; }
.progress-bar-23 { width: 23% !important; }

/* ===============================
   Alerts & Notifications
   =============================== */
.alert-custom {
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.alert-custom-primary {
    background-color: rgba(0, 212, 255, 0.1);
    color: var(--secondary-color);
    border-left: 4px solid var(--primary-color);
}

.alert-custom-success {
    background-color: rgba(0, 255, 136, 0.1);
    color: #0d6330;
    border-left: 4px solid var(--success-color);
}

.alert-custom-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* ===============================
   Loading & Animation States
   =============================== */
.spinner-large {
    width: 3rem !important;
    height: 3rem !important;
    border-width: 0.3rem;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
    z-index: 1000;
}

/* ===============================
   Utility Classes
   =============================== */
.display-none { display: none !important; }
.display-block { display: block !important; }
.text-primary-custom { color: var(--primary-color) !important; }
.text-success-custom { color: var(--success-color) !important; }
.bg-primary-custom { background-color: var(--primary-color) !important; }
.bg-success-custom { background-color: var(--success-color) !important; }

/* Sticky Elements */
.custom-sticky {
    top: 20px !important;
}

/* Background Icons */
.bg-icon-large {
    font-size: 12rem !important;
    opacity: 0.1 !important;
}

.bg-icon-medium {
    font-size: 8rem !important;
    opacity: 0.1 !important;
}

.bg-icon-small {
    font-size: 4rem !important;
    opacity: 0.15 !important;
}

/* Form Element Sizing */
.select-sm-width {
    max-width: 100px !important;
}

.w-auto {
    width: auto !important;
}

/* ===============================
   Client Dashboard Specific
   =============================== */
.client-dashboard-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.client-dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

.client-dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.service-status-badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-status-active {
    background-color: rgba(0, 255, 136, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.service-status-pending {
    background-color: rgba(255, 193, 7, 0.15);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.service-status-expired {
    background-color: rgba(220, 53, 69, 0.15);
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* ===============================
   Responsive Design
   =============================== */
@media (max-width: 1200px) {
    .stat-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 992px) {
    .admin-header,
    .client-header,
    .page-header {
        padding-top: 5.5rem;
        padding-bottom: 1.5rem;
    }

    .stat-content h3 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .admin-content,
    .client-content,
    .page-content {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .admin-card,
    .client-card,
    .custom-card {
        margin-bottom: 1.5rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .stat-content h3 {
        font-size: 1.75rem;
    }

    .client-dashboard-card {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .admin-header,
    .client-header,
    .page-header {
        padding-top: 5rem;
        padding-bottom: 1.25rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-content h3 {
        font-size: 1.5rem;
    }

    .client-dashboard-card {
        padding: 1.25rem;
    }

    .table-custom thead th,
    .table-custom tbody td {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
}

/* ===============================
   Dark Mode Support (Future)
   =============================== */
@media (prefers-color-scheme: dark) {
    /* Will be implemented later if needed */
}

/* ===============================
   Print Styles
   =============================== */
@media print {
    .admin-header,
    .client-header,
    .page-header {
        background: none !important;
        color: black !important;
        padding: 1rem 0 !important;
    }

    .admin-card,
    .client-card,
    .custom-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .btn {
        display: none !important;
    }
}

/* ===============================
   Animation Classes
   =============================== */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}