/* AIDAON Portal - Main Styles */

:root {
    --sidebar-width: 260px;
    --header-height: 60px;
    --primary-color: #4680ff;
    --sidebar-bg: #1c2333;
    --sidebar-color: #a9b7d0;
    --sidebar-active: #4680ff;
    --header-bg: #ffffff;
    --body-bg: #f4f7fa;
    --card-bg: #ffffff;
    --text-color: #343a40;
    --text-muted: #6c757d;
    --border-color: #e9ecef;
    --hover-bg: #f8f9fa;
    --danger-color: #dc3545;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Malgun Gothic', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-color);
    min-height: 100vh;
}

/* Sidebar */
.pc-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    z-index: 1030;
    transition: all 0.3s ease;
}

.pc-sidebar .m-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pc-sidebar .m-header .logo-text {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
}

.pc-sidebar .navbar-content {
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 15px 0;
}

.pc-navbar {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pc-navbar .pc-caption {
    padding: 15px 20px 8px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}

.pc-navbar .pc-item {
    margin: 2px 10px;
}

.pc-navbar .pc-item .pc-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--sidebar-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.pc-navbar .pc-item .pc-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.pc-navbar .pc-item.active .pc-link {
    background: var(--sidebar-active);
    color: #fff;
}

.pc-navbar .pc-item .pc-micon {
    width: 24px;
    margin-right: 10px;
    font-size: 1.1rem;
    text-align: center;
}

.pc-navbar .pc-item .pc-mtext {
    font-size: 0.9rem;
}

/* Header */
.pc-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--header-height);
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    transition: left 0.3s ease;
}

.pc-header .page-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.pc-header .page-title-link {
    color: var(--text-color);
    text-decoration: none;
}

.pc-header .page-title-link:hover {
    color: var(--primary-color);
}

.pc-header .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pc-header .user-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
}

.pc-header .user-dropdown .dropdown-toggle:hover {
    background: var(--body-bg);
}

.pc-header .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    color: var(--text-color);
}

/* Main Container */
.pc-container {
    margin-left: var(--sidebar-width);
    padding-top: var(--header-height);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.pc-content {
    padding: 20px;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* Auth Pages (Login, Install) */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, #2a3f5f 100%);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-card .logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-card .logo h2 {
    color: var(--primary-color);
    font-weight: 700;
}

.auth-card .form-label {
    font-weight: 500;
    margin-bottom: 6px;
}

.auth-card .form-control {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.auth-card .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(70, 128, 255, 0.15);
}

.auth-card .btn-primary {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    background: var(--primary-color);
    border: none;
}

.auth-card .btn-primary:hover {
    background: #3a6fe0;
}

.auth-card .alert {
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 991px) {
    .pc-sidebar {
        transform: translateX(-100%);
    }

    .pc-sidebar.mob-sidebar-active {
        transform: translateX(0);
    }

    .pc-header {
        left: 0;
    }

    .pc-container {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1025;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 576px) {
    .pc-content {
        padding: 15px;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .card-body {
        padding: 15px;
    }
}

/* Utility */
.text-muted {
    color: #6c757d !important;
}
