:root {
    --primary-color: #1e3a8a;
    /* Navy Blue from Logo */
    --secondary-color: #84cc16;
    /* Light Green from Logo */
    --accent-color: #334155;
    --bg-flat: #f8fafc;
    --border-color: #e2e8f0;
    --glass-bg: #ffffff;
    --glass-border: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --error-color: #dc2626;
    --success-color: #16a34a;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Global Status Pill Styles */
.status-pill {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid transparent;
}

.status-pending {
    background: #f0fdf4;
    color: #15803d;
    border-color: #dcfce7;
}

.status-processing {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #dbeafe;
}

.status-completed {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fee2e2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
}

body {
    background: #f1f5f9;
    /* Slightly lighter background */
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* New Layout Structure */
.app-container {
    display: flex;
    width: 100%;
}

.main-content {
    margin-left: 260px;
    /* Sidebar width */
    padding: 24px;
    padding-top: 84px;
    /* Space for fixed navbar */
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    width: calc(100% - 260px);
    /* Explicitly calculate remaining width to prevent overflow */
}

/* Sidebar Styles */
.sidebar {
    width: 260px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #e2e8f0;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
}

.sidebar-logo {
    padding: 0 24px 32px;
    display: flex;
    align-items: center;
}

.sidebar-logo img {
    height: 38px;
    width: auto;
}

.sidebar-nav {
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    gap: 12px;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

.sidebar-link.active {
    background: #eff6ff;
    color: var(--primary-color);
    border-right: 4px solid var(--primary-color);
    font-weight: 700;
}

.sidebar-icon {
    width: 20px;
    height: 20px;
}

/* Navbar Style (Simplified for top bar) */
.navbar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: left 0.3s ease;
}

/* ... existing navbar styles ... */

.navbar-inner {
    width: 100%;
    max-width: 1200px;
    margin-left: 24px;
    /* Matches main-content horizontal padding */
    margin-right: auto;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Navbar Search */
.nav-search-container {
    flex: 1;
    max-width: 400px;
    position: relative;
    display: flex;
    align-items: center;
    margin: 0;
    /* Removed margin to align exactly with content start */
}

.nav-search-container .search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    pointer-events: none;
}

.nav-search-container input {
    width: 100%;
    height: 38px;
    padding: 8px 12px 8px 36px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.nav-search-container input:focus {
    background: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    outline: none;
}

/* Mobile responsive search */
@media (max-width: 768px) {
    .nav-search-container {
        display: flex;
        /* Keep visible on mobile */
        margin: 0 10px;
        max-width: 250px;
    }

    .nav-logo img {
        height: 24px;
    }
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 32px;
    /* Logo size */
    width: auto;
}

.nav-items {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--primary-color);
}

/* Hamburger Menu Toggle (Hidden on Desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar.open+.sidebar-overlay {
        display: block;
        opacity: 1;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .navbar {
        left: 0;
    }

    .hamburger {
        display: flex;
        margin-right: 15px;
    }
}


.glass-container {
    padding: 0;
    width: 100%;
    max-width: 1200px;
    margin-left: 0;
    margin-right: auto;
}

h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: left;
    color: var(--primary-color);
}

.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    max-width: 1200px;
    margin-left: 0;
    margin-right: auto;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.form-group {
    margin-bottom: 14px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

input {
    width: 100%;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.1);
}

button {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 6px;
}

button:hover {
    background: #172554;
    border-color: #172554;
}

button:active {
    transform: translateY(0);
}

.footer-text {
    text-align: center;
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.footer-text a:hover {
    text-decoration: underline;
}

.alert {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: center;
}

.alert-error {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--error-color);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--success-color);
}

/* Pill-shaped Minimalist Search Bar */
.sticky-footer {
    position: fixed;
    bottom: 40px;
    left: 15px;
    right: 15px;
    width: auto;
    max-width: 500px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #c0c0c0;
    border-radius: 5px;
    padding: 10px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.footer-inner {
    display: flex;
    align-items: center;
}

.search-container {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.search-icon {
    width: 18px;
    height: 18px;
    color: #666;
    flex-shrink: 0;
}

.search-container input {
    flex: 1;
    border: none;
    padding: 10px 5px;
    font-size: 16px;
    background: transparent;
    color: #333;
}

.search-container input:focus {
    outline: none;
}

.search-divider {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
    margin: 0 5px;
}

.search-label {
    font-size: 0.85rem;
    color: #f6a641;
    font-weight: 600;
    white-space: nowrap;
    padding-right: 5px;
}

.contextual-action-container {
    position: fixed;
    bottom: 105px;
    left: 15px;
    right: 15px;
    width: auto;
    max-width: 500px;
    margin: 0 auto;
    z-index: 999;
}

.action-pill-btn {
    width: 100%;
    background: #f6a641;
    border: 1px solid #f6a641;
    color: #ffffff;
    border-radius: 5px;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(246, 166, 65, 0.2);
    transition: all 0.2s ease;
}

.action-pill-btn:hover {
    background: #e09530;
    box-shadow: 0 6px 20px rgba(246, 166, 65, 0.25);
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .sticky-footer {
        width: calc(100% - 30px);
        bottom: 20px;
        padding: 0 15px;
    }

    .search-label {
        display: none;
    }

    .search-divider {
        display: none;
    }
}

/* No Results Search Message */
.no-results-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    border: 1px dashed #cbd5e1;
    color: #94a3b8;
    font-size: 1rem;
    display: none;
}

.no-results-msg.active {
    display: block;
}

/* Common Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    padding: 40px 0;
}

.modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease-out;
}

.modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 600px;
    padding: 30px;
    border-radius: 5px;
    position: relative;
    box-shadow: var(--shadow-md);
    margin: auto;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f1f5f9;
}

@keyframes modalFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Search Results List */
/* Floating Search Results List */
.search-status-popup {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 600px;
    max-height: 60vh;
    overflow-y: auto;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    display: none;
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

@media (max-width: 600px) {
    .search-status-popup {
        bottom: 75px;
        /* Tighter fit above mobile footer */
        max-height: 50vh;
        /* Ensure visibility with keyboard open */
        width: 96%;
    }
}

.search-status-popup::-webkit-scrollbar {
    width: 6px;
}

.search-status-popup::-webkit-scrollbar-track {
    background: transparent;
}

.search-status-popup::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
}

/* Customer Management & Search Results Card Style */
.customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.customer-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 5px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.customer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-color);
}

.customer-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 4px;
}

.customer-card h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin: 0;
}

.customer-card .reg-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.customer-card .info-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.customer-card .info-row .label {
    color: var(--text-secondary);
    width: 70px;
    flex-shrink: 0;
    font-weight: 600;
}

.customer-card .info-row .value {
    color: var(--text-primary);
    word-break: break-all;
}

.customer-card .card-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-actions {
    display: flex;
    gap: 8px;
}

/* End of file */

/* No results text in popup */
/* Action Buttons (Shared & Standardized) */
.action-btn {
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

/* Primary style (Edit, Submit) */
.action-btn-primary {
    background: rgba(30, 58, 138, 0.05);
    color: var(--primary-color);
    border-color: rgba(30, 58, 138, 0.1);
}

.action-btn-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* Success style (Process, Register) */
.action-btn-success {
    background: rgba(16, 185, 129, 0.05);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.1);
}

.action-btn-success:hover {
    background: #10b981;
    color: white;
}

/* Error style (Delete) */
.action-btn-error {
    background: rgba(239, 68, 68, 0.05);
    color: var(--error-color);
    border-color: rgba(239, 68, 68, 0.1);
}

.action-btn-error:hover {
    background: var(--error-color);
    color: white;
}

/* Info style (View Details) */
.action-btn-info {
    background: rgba(79, 70, 229, 0.05);
    color: #4f46e5;
    border-color: rgba(79, 70, 229, 0.1);
}

.action-btn-info:hover {
    background: #4f46e5;
    color: white;
}

/* Neutral/Cancel style */
.action-btn-neutral {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.action-btn-neutral:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* Radio Button Group Styling (Back to Standard but Clean) */
.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding: 8px 0;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.radio-group input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

@media (max-width: 600px) {
    .mobile-hide {
        display: none !important;
    }

    .main-content {
        padding: 12px !important;
        padding-top: 70px !important;
    }

    .glass-container {
        padding: 0 !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
    }

    .status-overview {
        gap: 5px !important;
        margin-bottom: 20px !important;
    }

    .status-card {
        padding: 10px 5px !important;
    }

    .status-card .count {
        font-size: 1.2rem !important;
    }

    .section-title {
        margin-bottom: 10px !important;
        font-size: 1rem !important;
    }

    .activity-item {
        padding: 10px 12px !important;
    }

    .activity-desc {
        max-width: 180px !important;
        font-size: 0.8rem !important;
    }

    .service-card {
        padding: 10px 12px !important;
        gap: 4px !important;
    }

    .tile-row {
        gap: 8px !important;
    }

    .customer-name {
        font-size: 0.9rem !important;
    }

    .service-body {
        font-size: 0.8rem !important;
    }

    .action-btn {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
    }

    header h1 {
        font-size: 1.5rem !important;
        margin-bottom: 10px !important;
    }

    /* iOS 자동 확대 방지 (Font-size 16px 미만일 때 발생) */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Sidebar Submenu Styles */
.sidebar-group.active .sidebar-link {
    color: var(--primary-color);
    background: #eff6ff;
    border-right: 4px solid var(--primary-color);
    font-weight: 700;
}

.sidebar-submenu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-left: 0;
}

.sidebar-submenu.open {
    max-height: 200px;
    opacity: 1;
    padding-bottom: 5px;
}

.submenu-link {
    display: flex;
    align-items: center;
    padding: 8px 10px 8px 48px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    gap: 12px;
    transition: all 0.2s;
}

.submenu-link:hover {
    color: var(--primary-color);
    background: #f8fafc;
}

.submenu-link.active {
    color: var(--primary-color);
    font-weight: 700;
}

.submenu-link .dot {
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%;
    opacity: 0.5;
}

@media (max-width: 600px) {
    .submenu-link {
        padding: 10px 10px 10px 42px !important;
        font-size: 0.85rem !important;
    }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 5px;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    background: white;
}

.page-link:hover {
    background-color: #f1f5f9;
    color: var(--primary-color);
    border-color: var(--primary-color);
}