:root {
    
    --sns-blue: #003366;
    --sns-blue-dark: #002244;
    --sns-accent: #0066cc;
    --bg: #ffffff;
    --bg-soft: #f5f5f5;
    --text: #333333;
    --muted: #666666;
    --border: #dddddd;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.15);
    --radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg-soft);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Promo Strip */
.promo-strip {
    background: var(--sns-blue);
    color: white;
    padding: 8px 0;
    font-size: 12px;
    text-align: center;
}

/* Main Header */
.main-header {
    background: var(--bg);
    padding: 20px 0;
    border-bottom: 2px solid var(--sns-blue);
    box-shadow: var(--shadow);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 50px;
    width: auto;
}
.logosns {
    height: 40px;
    width: auto;
}
.main-header h1 {
    font-size: 24px;
    color: var(--sns-blue);
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.store-name {
    font-weight: 500;
    color: var(--sns-blue);
}

.user-badge {
    position: relative;
    background: var(--bg-soft);
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.user-badge.dropdown {
    cursor: pointer;
}

.user-name {
    font-weight: 500;
    color: var(--text);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    min-width: 150px;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--bg-soft);
    color: var(--sns-blue);
}

/* Navigation Tabs */
.nav-tabs {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.nav-tabs .container {
    display: flex;
    gap: 0;
}

.tab {
    padding: 12px 24px;
    text-decoration: none;
    color: var(--muted);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab:hover {
    color: var(--sns-accent);
    background: var(--bg-soft);
}

.tab.active {
    color: var(--sns-blue);
    border-bottom-color: var(--sns-blue);
    font-weight: 500;
}

.tab.logout {
    margin-left: auto;
    color: #cc0000;
}

.tab.logout:hover {
    color: #ff0000;
}

/* Main Content */
.main-content {
    padding: 30px 0;
    min-height: calc(100vh - 300px);
}

/* Cards */
.login-card, .status-card, .manager-card, .debug-card, .error-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 0 auto;
}

.login-container, .error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--sns-accent);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--sns-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--sns-blue-dark);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--muted);
    color: white;
}

.btn-secondary:hover {
    background: #555;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-cancel {
    background: var(--bg-soft);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-cancel:hover {
    background: var(--border);
}

/* Icon Buttons */
.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    padding: 0;
}

.btn-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.btn-up {
    background: #28a745;
    color: white;
}

.btn-up:hover {
    background: #218838;
    transform: scale(1.1);
}

.btn-up.active {
    background: #ffc107;
    color: #000;
}

.btn-break {
    background: var(--muted);
    color: white;
}

.btn-break:hover {
    background: #555;
}

.btn-return {
    background: #28a745;
    color: white;
}

.btn-return:hover {
    background: #218838;
}

.btn-logoff {
    background: #dc3545;
    color: white;
}

.btn-logoff:hover {
    background: #c82333;
}

.btn-menu {
    background: var(--bg-soft);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-menu:hover {
    background: var(--border);
}

/* Rotation List */
.rotation-page {
    max-width: 900px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* With Guest Section */
.with-guest-section,
.break-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border);
}

.section-title {
    color: var(--sns-blue);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

.rotation-item.with-guest-item {
    background: #fff9e6;
    border-left: 4px solid #ffc107;
}

.rotation-item.break-item {
    background: #fff4e6;
    border-left: 4px solid #ff9800;
}

/* Timer Display */
.timer-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sns-blue);
}

.timer-icon {
    font-size: 14px;
}

.timer-text {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.page-header h2 {
    color: var(--sns-blue);
    font-size: 28px;
}

.mode-badge {
    background: var(--bg-soft);
    padding: 8px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.rotation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rotation-item {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.2s;
    cursor: default;
}

.rotation-item:hover {
    box-shadow: var(--shadow-hover);
}

.rotation-item.draggable-item {
    cursor: move;
}

.rotation-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.rotation-item.drag-over {
    border-top: 3px solid var(--sns-accent);
    background: #e6f2ff;
}

.item-drag-handle {
    color: var(--muted);
    cursor: grab;
    display: flex;
    align-items: center;
    padding: 4px;
    transition: color 0.2s;
    user-select: none;
    pointer-events: auto;
}

.item-drag-handle:hover {
    color: var(--sns-accent);
}

.rotation-item.dragging .item-drag-handle {
    cursor: grabbing;
}

.rotation-item.draggable-item .item-actions {
    pointer-events: auto;
}

.rotation-item.next-up {
    border-left: 4px solid #28a745;
    background: #f0fff4;
}

.item-number {
    font-size: 24px;
    font-weight: bold;
    color: var(--sns-blue);
    min-width: 40px;
    text-align: center;
}

.item-name {
    flex: 1;
    font-size: 18px;
    font-weight: 500;
}

.item-status {
    min-width: 120px;
}

.item-actions {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-up {
    background: #ffc107;
    color: #000;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.badge-secondary {
    background: var(--bg-soft);
    color: var(--text);
}

.badge-break {
    background: #ff9800;
    color: white;
}

.badge-logged-off {
    background: #6c757d;
    color: white;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-content h3 {
    margin-bottom: 20px;
    color: var(--sns-blue);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Status Page */
.my-status-page, .manager-page, .debug-page {
    max-width: 800px;
    margin: 0 auto;
}

.status-info {
    margin: 20px 0;
}

.info-row {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child {
    border-bottom: none;
}

.status-actions {
    margin-top: 30px;
}

/* Manager Page */
.mode-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.mode-selector label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.mode-selector label:hover {
    background: var(--bg-soft);
}

.manager-actions {
    margin-top: 20px;
}

/* Debug Page */
.debug-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.debug-card {
    max-width: none;
}

.result-box {
    margin-top: 15px;
    padding: 15px;
    background: var(--bg-soft);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
}

.logs-output {
    font-size: 11px;
    line-height: 1.4;
}

/* HTTP Warning */
.http-warning {
    background: #ffc107;
    color: #000;
    text-align: center;
    padding: 8px;
    font-weight: 500;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-tabs .container {
        flex-wrap: wrap;
    }

    .rotation-item {
        flex-wrap: wrap;
    }

    .item-actions {
        flex-wrap: wrap;
    }
}

