/*
   Zenora Florist - Reusable Components
    */

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    line-height: 1.4;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.82rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(95, 139, 76, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--brown);
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
    border-color: var(--secondary-dark);
    transform: translateY(-2px);
}

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

.btn-accent:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline-white:hover {
    background: var(--white);
    color: var(--primary);
}

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

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-warning {
    background: #f59e0b;
    color: var(--white);
    border-color: #f59e0b;
}

.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ----- Badges / Status ----- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    letter-spacing: 0.3px;
}

.badge-primary {
    background: rgba(95, 139, 76, 0.12);
    color: var(--primary);
}

.badge-secondary {
    background: rgba(255, 221, 171, 0.5);
    color: var(--brown);
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-purple {
    background: #f3e8ff;
    color: #6b21a8;
}

/* Status Badges */
.status-menunggu {
    background: #fef3c7;
    color: #92400e;
}

.status-diproses {
    background: #dbeafe;
    color: #1e40af;
}

.status-dikirim {
    background: #f3e8ff;
    color: #6b21a8;
}

.status-selesai {
    background: #dcfce7;
    color: #166534;
}

.status-dibatalkan {
    background: #fee2e2;
    color: #991b1b;
}

/* ----- Stat Cards (Admin Dashboard) ----- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    transform: translate(30%, -30%);
    opacity: 0.1;
}

.stat-card:nth-child(1)::after {
    background: var(--primary);
}

.stat-card:nth-child(2)::after {
    background: var(--accent);
}

.stat-card:nth-child(3)::after {
    background: #818cf8;
}

.stat-card:nth-child(4)::after {
    background: var(--secondary-dark);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--gray-400);
    font-weight: 500;
    margin-top: 4px;
}

/* ----- Sidebar Styles ----- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: var(--white);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-100);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
}

.sidebar-badge {
    padding: 2px 10px;
    background: rgba(95, 139, 76, 0.12);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: var(--transition-fast);
}

.sidebar-link:hover {
    background: rgba(95, 139, 76, 0.08);
    color: var(--primary);
}

.sidebar-item.active .sidebar-link {
    background: rgba(95, 139, 76, 0.12);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-icon {
    font-size: 1.15rem;
    min-width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--gray-100);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
}

.user-avatar {
    font-size: 1.5rem;
}

.user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-700);
    display: block;
}

.user-role {
    font-size: 0.72rem;
    color: var(--gray-400);
}

.sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: #ef4444;
    transition: var(--transition-fast);
}

.sidebar-logout:hover {
    background: #fef2f2;
}

.sidebar-toggle-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1001;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.sidebar-toggle-btn .toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--gray-600);
    border-radius: 2px;
}

/* ----- Pagination ----- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-200);
    transition: var(--transition-fast);
}

.page-link:hover,
.page-link.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ----- Modal ----- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 480px;
    width: 90%;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* ----- Toolbar ----- */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.toolbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* ----- Dashboard Info Cards ----- */
.info-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.info-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

/* ----- Order Status Select ----- */
.status-select {
    padding: 6px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    background: var(--white);
    cursor: pointer;
    appearance: auto;
}

/* ----- Customer Dashboard Cards ----- */
.welcome-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

.welcome-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 6px;
}

.welcome-text {
    font-size: 0.92rem;
    opacity: 0.9;
}

.customer-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.customer-stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.customer-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
}

.customer-stat-label {
    font-size: 0.82rem;
    color: var(--gray-400);
    margin-top: 4px;
}

/* ----- Profile Page ----- */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.profile-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

.profile-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}

/* ----- Actions column ----- */
.actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-btn {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
}

.action-edit {
    background: rgba(95, 139, 76, 0.1);
    color: var(--primary);
}

.action-edit:hover {
    background: var(--primary);
    color: var(--white);
}

.action-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.action-delete:hover {
    background: #ef4444;
    color: var(--white);
}

.action-view {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.action-view:hover {
    background: #3b82f6;
    color: var(--white);
}

/* ----- Utility Classes ----- */
.text-center {
    text-align: center;
}

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

.text-primary {
    color: var(--primary);
}

.text-muted {
    color: var(--gray-400);
}

.text-danger {
    color: #ef4444;
}

.text-success {
    color: #16a34a;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.mt-8 {
    margin-top: 8px;
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 24px;
}

.mt-32 {
    margin-top: 32px;
}

.mb-8 {
    margin-bottom: 8px;
}

.mb-16 {
    margin-bottom: 16px;
}

.mb-24 {
    margin-bottom: 24px;
}

.gap-12 {
    gap: 12px;
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

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

.justify-between {
    justify-content: space-between;
}

.d-none {
    display: none;
}