/* Black & Gold Premium Theme */
:root {
    --gold: #D4AF37;
    --gold-hover: #F3E5AB;
    --gold-dark: #AA801E;
    --black-bg: #0A0A0A;
    --black-surface: #141414;
    --black-elevated: #1F1F1F;
    --text-primary: #FFFFFF;
    --text-muted: #A0A0A0;
}

body {
    background-color: var(--black-bg);
    color: var(--text-primary);
    font-family: 'Prompt', 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

* {
    box-sizing: border-box;
}

input, select, textarea, button {
    font-family: inherit;
}

/* SweetAlert2 Premium Overrides */
.swal2-popup {
    font-family: 'Prompt', 'Inter', sans-serif !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    border-radius: 16px !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6) !important;
}

.swal2-title {
    color: var(--gold) !important;
    font-weight: 500 !important;
}

.swal2-input, .swal2-select, .swal2-textarea {
    background-color: var(--black-elevated) !important;
    border: 1px solid #333 !important;
    color: white !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    font-size: 1rem !important;
    box-shadow: none !important;
}

.swal2-input:focus, .swal2-select:focus, .swal2-textarea:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2) !important;
    outline: none !important;
}

.swal2-select {
    padding: 0.8rem 1rem !important;
    height: auto !important;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 1em !important;
}

.swal2-validation-message {
    background: transparent !important;
    color: #ff4d4d !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(0.8) sepia(1) hue-rotate(330deg) saturate(3);
    cursor: pointer;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1b1b1b, #000000);
}

.login-card {
    background-color: var(--black-surface);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    color: var(--gold);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gold);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--black-elevated);
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #000;
    border: none;
    padding: 0.9rem;
    width: 100%;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.btn-gold:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Dashboard Styles */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: var(--black-surface);
    border-right: 1px solid rgba(212, 175, 55, 0.1);
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 1.5rem;
    color: var(--gold);
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
}

.nav-item {
    padding: 0.8rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover, .nav-item.active {
    background-color: rgba(212, 175, 55, 0.05);
    color: var(--gold);
    border-left-color: var(--gold);
}

.user-profile {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-profile .name {
    display: block;
    font-size: 1rem;
}

.user-profile .role {
    font-size: 0.8rem;
    color: var(--gold);
    margin-top: 0.2rem;
    display: inline-block;
    padding: 2px 8px;
    background: rgba(212,175,55,0.1);
    border-radius: 4px;
}

.main-content {
    flex: 1;
    background-color: var(--black-bg);
    padding: 2rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-title {
    font-size: 1.8rem;
    font-weight: 500;
}

.card {
    background-color: var(--black-surface);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1.5rem;
}

.card-title {
    color: var(--gold);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline:hover {
    color: white;
    border-color: white;
}

[v-cloak] {
    display: none;
}

/* Phone Management Styles */
.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.num-card {
    background-color: var(--black-elevated);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    transition: transform 0.3s ease;
}

.num-card:hover {
    transform: translateY(-5px);
}

.num-card .phone {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.num-card .network {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    background-color: #333;
}
.network.true { background-color: #E52E2D; color: white; }
.network.dtac { background-color: #00AADC; color: white; }
.network.ais { background-color: #A5CD39; color: black; }

.num-card .expiry {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.num-card .action-btns {
    position: absolute;
    top: 10px;
    right: 10px;
}

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s;
    font-size: 1.2rem;
}

.btn-icon:hover {
    color: #ff4d4d;
}

@keyframes blink-red {
    0% { box-shadow: 0 0 5px red; border-color: red; }
    100% { box-shadow: 0 0 20px rgba(255, 0, 0, 0.4); border-color: darkred; }
}

.expire-warning {
    animation: blink-red 1s infinite alternate;
}

.header-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.header-action h2 { margin: 0; color: var(--gold); font-size: 1.2rem; }

/* Farm Management Styles */
.farm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.farm-card {
    background-color: var(--black-elevated);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    transition: transform 0.3s ease;
}

.farm-card:hover {
    transform: translateY(-5px);
}

.farm-card .device-info {
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.farm-card .device-info span {
    font-weight: 600;
}

.farm-card .status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
    background-color: transparent;
    color: #fff;
}

.farm-card .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

/* Status Colors */
.status-red .status-dot { background-color: #e74c3c; box-shadow: 0 0 5px #e74c3c; }
.status-red { border: 1px solid rgba(231, 76, 60, 0.3); background-color: rgba(231, 76, 60, 0.1) !important; }

.status-green .status-dot { background-color: #A5CD39; box-shadow: 0 0 5px #A5CD39; }
.status-green { border: 1px solid rgba(165, 205, 57, 0.3); background-color: rgba(165, 205, 57, 0.1) !important; }

.status-orange .status-dot { background-color: #f39c12; box-shadow: 0 0 5px #f39c12; }
.status-orange { border: 1px solid rgba(243, 156, 18, 0.3); background-color: rgba(243, 156, 18, 0.1) !important; }

.status-magenta .status-dot { background-color: #e056fd; box-shadow: 0 0 5px #e056fd; }
.status-magenta { border: 1px solid rgba(224, 86, 253, 0.3); background-color: rgba(224, 86, 253, 0.1) !important; }

.status-darkred .status-dot { background-color: #c0392b; box-shadow: 0 0 5px #c0392b; }
.status-darkred { border: 1px solid rgba(192, 57, 43, 0.3); background-color: rgba(192, 57, 43, 0.1) !important; }

.farm-card .owner {
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 0.8rem;
    margin-top: 0.5rem;
}

.btn-edit-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gold);
    font-size: 1.1rem;
    transition: color 0.3s;
    margin-right: 5px;
}

.btn-edit-icon:hover {
    color: #FFF;
}
