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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 50%, #60A5FA 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15),
                0 10px 20px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
    padding: 45px 35px;
    text-align: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1;
}

.logo-section {
    margin-bottom: 30px;
}

.logo {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
}

h1 {
    color: #1E3A8A;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #64748B;
    font-size: 15px;
    margin-bottom: 35px;
    font-weight: 400;
}

/* Form Styles */
.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    color: #374151;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.25px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-group input:focus {
    outline: none;
    border-color: #3B82F6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1),
                0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #1E3A8A, #3B82F6);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
    letter-spacing: 0.5px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4),
                0 4px 15px rgba(30, 58, 138, 0.3);
    background: linear-gradient(135deg, #2563EB, #3B82F6);
}

.login-btn:active {
    transform: translateY(0);
}

.btn-loader {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.footer-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.footer-links a {
    color: #FF6B35;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #FF8C42;
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25),
                0 15px 30px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.6);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 28px 28px 20px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05), rgba(59, 130, 246, 0.05));
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    color: #2d3748;
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #64748B;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #1E3A8A;
    background: rgba(30, 58, 138, 0.1);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

.info-icon {
    text-align: center;
    margin-bottom: 20px;
}

.modal-body p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.activation-info {
    background: #f7fafc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.activation-info h4 {
    color: #2d3748;
    font-size: 16px;
    margin-bottom: 12px;
}

.activation-info ol {
    color: #4a5568;
    margin-left: 20px;
    margin-bottom: 16px;
}

.activation-info li {
    margin-bottom: 8px;
}

.price-info {
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.contact-info {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    border-radius: 8px;
    padding: 16px;
}

.contact-info p {
    margin-bottom: 8px;
    text-align: left;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    text-align: right;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Admin Panel Styles */
.admin-panel {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f7fafc;
}

.admin-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-logo {
    width: 120px;
    height: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info span {
    color: #4a5568;
    font-weight: 500;
}

.logout-btn {
    background: #fed7d7;
    color: #c53030;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #fc8181;
    color: white;
}

.admin-nav {
    background: #2d3748;
    padding: 0 24px;
}

.admin-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-nav li {
    margin-right: 2px;
}

.admin-nav a {
    display: block;
    color: #a0aec0;
    text-decoration: none;
    padding: 16px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
}

.admin-nav a:hover,
.admin-nav li.active a {
    background: #4a5568;
    color: white;
}

.admin-content {
    flex: 1;
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    overflow-y: auto;
}

.content-section h2 {
    color: #2d3748;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #FF6B35;
}

.stat-card h3 {
    color: #718096;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    color: #2d3748;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-change {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

.stat-change.positive {
    color: #38a169;
    background: #f0fff4;
}

.stat-change.negative {
    color: #e53e3e;
    background: #fff5f5;
}

.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #f7fafc;
    color: #4a5568;
    font-weight: 600;
    padding: 16px;
    text-align: left;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 16px;
    border-top: 1px solid #e2e8f0;
    color: #2d3748;
}

.status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status.delivered {
    background: #f0fff4;
    color: #38a169;
}

.status.in-transit {
    background: #ebf8ff;
    color: #3182ce;
}

.btn-small {
    background: #edf2f7;
    color: #4a5568;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: #e2e8f0;
}

/* Responsive Design - Mobile First */
@media (max-width: 768px) {
    body {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .login-container {
        max-width: 100%;
        padding: 10px;
    }
    
    .login-card {
        padding: 30px 20px;
        border-radius: 12px;
    }
    
    .logo {
        width: 120px;
        margin-bottom: 15px;
    }
    
    h1 {
        font-size: 22px;
        margin-bottom: 6px;
    }
    
    .subtitle {
        font-size: 13px;
        margin-bottom: 25px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .login-btn {
        padding: 16px;
        font-size: 16px;
        font-weight: 600;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        margin-top: 20px;
    }
    
    .footer-links a {
        font-size: 13px;
        padding: 8px 0;
    }
    
    /* Modal Mobile */
    .modal-content {
        width: 95%;
        margin: 5% auto;
        border-radius: 12px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 20px 20px 16px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .activation-info {
        padding: 16px;
    }
    
    .activation-info h4 {
        font-size: 15px;
    }
    
    .price-info {
        font-size: 16px;
        padding: 10px 14px;
    }
    
    .contact-info {
        padding: 14px;
    }
    
    .contact-info p {
        font-size: 13px;
    }
    
    /* Admin Panel Mobile */
    .admin-panel {
        height: 100vh;
        overflow-x: hidden;
    }
    
    .header-content {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .admin-logo {
        width: 100px;
    }
    
    .user-info {
        flex: 1;
        text-align: right;
        min-width: 120px;
    }
    
    .user-info span {
        font-size: 14px;
        display: block;
        margin-bottom: 8px;
    }
    
    .logout-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .admin-nav {
        padding: 0 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-nav ul {
        min-width: max-content;
        display: flex;
        gap: 2px;
    }
    
    .admin-nav li {
        margin-right: 0;
    }
    
    .admin-nav a {
        padding: 14px 16px;
        font-size: 13px;
        white-space: nowrap;
    }
    
    .admin-content {
        padding: 16px;
        padding-bottom: 80px; /* Space for mobile navigation */
    }
    
    .content-section h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }
    
    .data-table {
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .status {
        font-size: 11px;
        padding: 4px 8px;
    }
    
    .btn-small {
        font-size: 11px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
        padding-top: 10px;
    }
    
    .login-card {
        padding: 25px 15px;
        margin: 10px 0;
    }
    
    .logo {
        width: 100px;
        margin-bottom: 12px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    .subtitle {
        font-size: 12px;
        margin-bottom: 20px;
    }
    
    .form-group input {
        padding: 12px 14px;
    }
    
    .login-btn {
        padding: 14px;
        font-size: 15px;
    }
    
    .modal-content {
        width: 98%;
        margin: 2% auto;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 16px 16px 12px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .activation-info {
        padding: 12px;
    }
    
    .activation-info h4 {
        font-size: 14px;
    }
    
    .price-info {
        font-size: 15px;
        padding: 8px 12px;
    }
    
    .contact-info {
        padding: 12px;
    }
    
    .contact-info p {
        font-size: 12px;
    }
    
    .header-content {
        padding: 10px 12px;
    }
    
    .admin-logo {
        width: 80px;
    }
    
    .user-info span {
        font-size: 12px;
    }
    
    .logout-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .admin-nav a {
        padding: 12px 14px;
        font-size: 12px;
    }
    
    .admin-content {
        padding: 12px;
        padding-bottom: 60px;
    }
    
    .content-section h2 {
        font-size: 20px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 6px;
        font-size: 12px;
    }
    
    .btn-small {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* Mobile Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
    .login-btn:active,
    .tracking-btn:active,
    .btn-primary:active {
        transform: scale(0.98);
    }
    
    .admin-nav a:active {
        background: #4a5568;
    }
    
    .btn-small:active {
        background: #cbd5e0;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .login-container {
        padding: 5px;
        min-height: 100vh;
        justify-content: center;
    }
    
    .login-card {
        padding: 20px 15px;
        margin: 10px 0;
    }
    
    .logo {
        width: 80px;
        margin-bottom: 10px;
    }
    
    h1 {
        font-size: 18px;
        margin-bottom: 4px;
    }
    
    .subtitle {
        font-size: 11px;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group input {
        padding: 10px 12px;
    }
    
    .login-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .modal-content {
        max-height: 80vh;
    }
}

/* iPhone Notch Support */
@supports (padding: max(0px)) {
    .admin-panel {
        padding-top: env(safe-area-inset-top);
    }
    
    .admin-content {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }
}
