/* ============================================
   SUIMAS AI - Interior Design System v4.0
   Premium Glassmorphism Theme with Mobile Support
   ============================================ */

:root {
    /* Color Palette */
    --primary: #00C853;
    --primary-dark: #009624;
    --primary-light: #e8f5e9;
    --secondary: #FF6D00;
    --secondary-dark: #E65100;
    --secondary-light: #fff3e0;

    /* Backgrounds */
    --bg-body: #f4f7f6;
    --bg-surface: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.95);

    /* Text */
    --text-main: #2d3436;
    --text-muted: #636e72;

    /* Borders & Shadows */
    --border-color: #dfe6e9;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 70px;
    --radius: 12px;
    --font-main: 'Outfit', sans-serif;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
}

.sidebar-nav li {
    margin-bottom: 0.3rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.5rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-left-color: var(--primary);
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
}

/* ============================================
   MAIN WRAPPER
   ============================================ */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* ============================================
   TOP HEADER
   ============================================ */
.top-header {
    height: var(--header-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* ============================================
   NOTIFICATIONS
   ============================================ */
.notif-wrapper {
    position: relative;
}

.notif-icon {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.2rem;
    position: relative;
    transition: color 0.2s;
}

.notif-icon:hover {
    color: var(--primary);
}

.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--secondary);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-surface);
    animation: pulse-notification 2s infinite;
}

@keyframes pulse-notification {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.notif-dropdown {
    position: absolute;
    top: 150%;
    right: 0;
    width: 350px;
    max-height: 450px;
    background: var(--bg-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1100;
}

.notif-dropdown.show {
    display: flex;
}

.notif-header {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-list {
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
}

.notif-list li {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.notif-list li:hover {
    background: #f8f9fa;
}

.notif-list li.unread {
    background: #f0f9ff;
    font-weight: 500;
}

.notif-list li:last-child {
    border-bottom: none;
}

.notif-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #999;
    cursor: pointer;
    font-size: 0.9rem;
}

.notif-delete:hover {
    color: #ff5252;
}

/* ============================================
   CONTENT BODY
   ============================================ */
.content-body {
    padding: 2rem;
}

/* ============================================
   GRID & CARDS
   ============================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card h2,
.card h3 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.card-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

/* ============================================
   FORMS & INPUTS
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    background: white;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.1);
}

/* ============================================
   BUTTONS
   ============================================ */
button,
.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-decoration: none;
}

button:hover,
.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    background: var(--primary-dark);
}

button.secondary,
.btn.secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    box-shadow: none;
}

button.secondary:hover,
.btn.secondary:hover {
    background: #f1f1f1;
    border-color: #ccc;
}

/* ============================================
   TABLES
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
}

th {
    text-align: left;
    padding: 1rem;
    background: #f8f9fa;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f8f9fa;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.badge.planned {
    background: #e3f2fd;
    color: #1976d2;
}

.badge.ongoing {
    background: #fff3e0;
    color: #f57c00;
}

.badge.completed {
    background: #e8f5e9;
    color: #388e3c;
}

/* ============================================
   AI CHAT WIDGET
   ============================================ */
.ai-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
}

.ai-button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), #ff9100);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ai-button:hover {
    transform: scale(1.1);
}

.ai-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    background: var(--bg-surface);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease-out;
}

.ai-chat-window.open {
    display: flex;
}

.ai-header {
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-message {
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    max-width: 85%;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ai-message.bot {
    background: white;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.ai-message.user {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.ai-input {
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.ai-input input {
    flex: 1;
    border-radius: 50px;
    background: #f1f3f4;
    border: none;
    padding: 0.75rem 1rem;
}

.ai-input input:focus {
    background: white;
    border: 1px solid var(--primary);
}

.ai-input button {
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 250px;
        z-index: 1001;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .top-header {
        padding: 0 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .content-body {
        padding: 1rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .ai-chat-window {
        width: 320px;
        height: 500px;
        right: -10px;
    }

    .notif-dropdown {
        width: 300px;
        right: -10px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ============================================
   LANDING PAGE (index.php)
   ============================================ */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero .tagline {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.cta-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 200, 83, 0.4);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
}

.feature-card {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero .tagline {
        font-size: 1.1rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}