/* Aircon Management System - Main Stylesheet */

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

:root {
    /* CYKE Brand Colors */
    --primary-color: #0066cc;        /* Blue - primary brand color */
    --secondary-color: #004499;      /* Darker blue */
    --accent-color: #32CD32;        /* Lime green accent */
    --accent-light: #7CFC00;        /* Light lime green */
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #000000;           /* Black for text */
    --light-color: #ffffff;          /* White background */
    --border-color: #dee2e6;
    --text-color: #000000;           /* Black text */
    --text-muted: #333333;
    --water-blue: #00a8e8;           /* Water-like blue */
    --water-blue-light: #4dd0e1;    /* Light water blue */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
}

/* CYKE Brand Font Enhancement */
h1, h2, h3, .brand-name {
    font-weight: 900;
    letter-spacing: -0.5px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--water-blue) 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid var(--accent-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.nav-brand .logo-gif {
    height: 60px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
    display: block;
}

.nav-brand .brand-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-brand .logo-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-brand .wave-icon {
    width: 100%;
    height: 100%;
    position: relative;
}

.nav-brand .wave-icon::before,
.nav-brand .wave-icon::after {
    content: '';
    position: absolute;
    border: 3px solid var(--water-blue-light);
    border-radius: 50%;
    opacity: 0.8;
}

.nav-brand .wave-icon::before {
    width: 30px;
    height: 30px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-color: var(--water-blue-light);
}

.nav-brand .wave-icon::after {
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-color: var(--primary-color);
}

.nav-brand .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-brand .brand-name {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--water-blue-light) 0%, var(--primary-color) 50%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(0, 168, 232, 0.3);
    letter-spacing: 1px;
}

.nav-brand .brand-name .y-accent {
    color: var(--accent-color);
    -webkit-text-fill-color: var(--accent-color);
}

.nav-brand .brand-tagline {
    font-size: 11px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
    margin-top: -2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 30px 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--water-blue) 50%, var(--water-blue-light) 100%);
    color: white;
    padding: 100px 20px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::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 1200 120"><path d="M0,60 Q300,20 600,60 T1200,60 L1200,120 L0,120 Z" fill="rgba(255,255,255,0.1)"/></svg>') repeat-x;
    background-size: 1200px 120px;
    animation: wave 20s linear infinite;
    opacity: 0.3;
}

@keyframes wave {
    0% { background-position-x: 0; }
    100% { background-position-x: 1200px; }
}

.hero-section h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Features Section */
.features-section {
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.feature-card i {
    font-size: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
}

/* Products Section */
.products-section {
    margin-top: 50px;
}

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

.page-header h1 {
    font-size: 32px;
    color: var(--text-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.product-card img,
.product-placeholder {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-placeholder i {
    font-size: 48px;
    color: #999;
}

.product-info {
    padding: 20px;
}

.product-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--water-blue) 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
    border-left: 3px solid var(--accent-color);
}

.product-info h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.product-brand {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 5px;
}

.product-capacity {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.product-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--water-blue) 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--text-muted);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

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

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

.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

.btn-large {
    padding: 15px 30px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
}

/* Forms */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

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

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

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

/* Tables */
.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: var(--light-color);
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--text-color);
}

tbody tr:hover {
    background-color: #f8f9fa;
}

.text-center {
    text-align: center;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-pending { background-color: #fff3cd; color: #856404; }
.badge-scheduled { background-color: #d1ecf1; color: #0c5460; }
.badge-in-progress { background-color: #cfe2ff; color: #084298; }
.badge-completed { background-color: #d4edda; color: #155724; }
.badge-cancelled { background-color: #f8d7da; color: #721c24; }
.badge-low { background-color: #fff3cd; color: #856404; }
.badge-medium { background-color: #d1ecf1; color: #0c5460; }
.badge-high { background-color: #f8d7da; color: #721c24; }
.badge-urgent { background-color: #f8d7da; color: #721c24; }
.badge-in-stock { background-color: #d4edda; color: #155724; }
.badge-low-stock { background-color: #fff3cd; color: #856404; }
.badge-out-of-stock { background-color: #f8d7da; color: #721c24; }

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-card.warning {
    border-left: 4px solid var(--warning-color);
}

.stat-card.danger {
    border-left: 4px solid var(--danger-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.stat-icon.blue { background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%); }
.stat-icon.green { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.stat-icon.purple { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stat-icon.orange { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.stat-icon.red { background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%); }
.stat-icon.yellow { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }
.stat-icon.cyan { background: linear-gradient(135deg, #06d6d6 0%, #118ab2 100%); }
.stat-icon.teal { background: linear-gradient(135deg, #0ea5a5 0%, #06b6d4 100%); }
.stat-icon.lime { background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%); }

.stat-content h3 {
    font-size: 32px;
    margin-bottom: 5px;
}

.stat-content p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.dashboard-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.dashboard-card h2 {
    margin-bottom: 20px;
}

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

/* Filters */
.filters-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

/* Product Detail */
.product-detail-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-image-section img,
.product-placeholder-large {
    width: 100%;
    border-radius: 10px;
}

.product-placeholder-large {
    height: 400px;
    background: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
}

.product-category-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
}

.price-section {
    background: var(--light-color);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.price-label {
    display: block;
    color: var(--text-muted);
    font-size: 14px;
}

.price-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-label {
    color: var(--text-muted);
    font-size: 14px;
}

.spec-value {
    font-weight: 600;
}

.features-list {
    list-style: none;
    margin-top: 15px;
}

.features-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.features-list i {
    color: var(--success-color);
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

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

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

.login-header i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
}

.login-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

/* Back Link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 500;
}

.back-link:hover {
    color: #5568d3;
}

/* Image Upload Styles */
#imagePreview, #currentImage {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px dashed #dee2e6;
}

#imagePreview img, #currentImage img {
    display: block;
    margin: 0 auto;
}

.file-upload-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-upload-wrapper input[type=file] {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: white;
}

.file-upload-wrapper input[type=file]:hover {
    border-color: var(--primary-color);
}

/* Product Image Thumbnail in Table */
table img {
    max-width: 50px;
    max-height: 50px;
    object-fit: cover;
    border-radius: 4px;
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 10px;
    }

    .hero-section h1 {
        font-size: 32px;
    }

    .product-detail-container {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .specs-grid {
        grid-template-columns: 1fr;
    }
}
/* Navigation Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--light-color);
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1001;
    border-radius: 8px;
    top: 100%;
    right: 0;
    overflow: hidden;
    border-top: 3px solid var(--accent-color); /* Matches CYKE accent */
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--text-color) !important; /* Force visibility against navbar white text */
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s;
}

.dropdown-content a i {
    width: 20px;
    margin-right: 10px;
    color: var(--primary-color);
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
    color: var(--secondary-color) !important;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 4px 0;
}

/* User Menu Adjustment */
.logout-link {
    color: var(--accent-color) !important;
    font-weight: bold;
}

/* Stack icons and text vertically in the navbar */
.navbar .container ul li a {
    display: flex;
    flex-direction: column; /* Stacks children vertically */
    align-items: center;    /* Centers items horizontally */
    justify-content: center;
    text-align: center;
    padding: 8px 12px;
    font-size: 13px;       /* Slightly smaller font for better vertical fit */
    gap: 4px;              /* Space between icon and text */
}

/* Adjust the icon properties */
.navbar .container ul li a i {
    margin-right: 0 !important; /* Remove existing right margin */
    font-size: 1.2rem;          /* Ensure the icon is slightly larger than text */
}

/* Ensure the management dropdown maintains row layout for its items */
.dropdown-content a {
    flex-direction: row !important; /* Keep sub-menu items as horizontal rows */
    text-align: left !important;
    align-items: center !important;
    padding: 12px 16px !important;
}

.dropdown-content a i {
    margin-right: 10px !important; /* Restore side margin for dropdown icons */
    margin-bottom: 0 !important;
}

/* Adjust the User Menu to keep the icon and name balanced */
.user-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
}