* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
}

body {
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.4;
    padding: 8px;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 5px;
}

.header {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header h1 {
    font-size: 20px;
    font-weight: 500;
    text-align: center;
}

.btn {
    display: inline-block;
    padding: 10px 15px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    margin: 4px;
    font-size: 14px;
    transition: all 0.2s;
    min-height: 40px;
}

.btn:hover {
    background-color: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-danger {
    background-color: #f44336;
}

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

.btn-edit {
    background-color: #2196F3;
}

.btn-edit:hover {
    background-color: #0b7dda;
}

.btn-status {
    background-color: #ff9800;
    font-size: 13px;
    padding: 8px 12px;
}

.btn-status:hover {
    background-color: #e68a00;
}

.actions {
    white-space: nowrap;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.actions .btn {
    flex: 1;
    min-width: 60px;
    text-align: center;
    padding: 8px 5px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    background: white;
}

thead {
    display: none;
}

tr {
    display: block;
    margin-bottom: 12px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    background: white;
}

td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

td:before {
    content: attr(data-label);
    font-weight: 500;
    text-align: left;
    padding-right: 15px;
}

td:last-child {
    border-bottom: 0;
}

tbody tr:hover {
    background-color: #f1f8e9;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px; /* Larger for mobile */
    min-height: 44px; /* Better touch target */
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.card {
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.alert {
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
}

.alert-success {
    color: #2e7d32;
    background-color: #e8f5e9;
    border-color: #c8e6c9;
}

.alert-error {
    color: #c62828;
    background-color: #ffebee;
    border-color: #ffcdd2;
}

.status-badge {
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
}

.status-terjual {
    background-color: #4CAF50;
    color: white;
}

.status-belum {
    background-color: #f44336;
    color: white;
}

.filter-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-item label {
    font-size: 14px;
    font-weight: 500;
}

.filter-item select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    min-height: 44px;
}

.table-container {
    overflow-x: auto;
}

.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

/* Desktop styles */
@media (min-width: 768px) {
    body {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 24px;
        text-align: left;
    }
    
    .filter-container {
        flex-direction: row;
        align-items: center;
    }
    
    .filter-item {
        flex-direction: row;
        align-items: center;
    }
    
    thead {
        display: table-header-group;
    }
    
    tr {
        display: table-row;
        margin-bottom: 0;
        box-shadow: none;
    }
    
    td {
        display: table-cell;
        text-align: left;
        padding: 10px 12px;
    }
    
    td:before {
        display: none;
    }
    
    .mobile-only {
        display: none;
    }
    
    .desktop-only {
        display: block;
    }
    
    .actions {
        display: table-cell;
    }
    
    .actions .btn {
        display: inline-block;
        flex: none;
        min-width: auto;
    }
    
    table {
        font-size: 14px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 13px;
        min-height: auto;
    }
}

/* Very small devices */
@media (max-width: 360px) {
    .header h1 {
        font-size: 18px;
    }
    
    .btn {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    td {
        padding: 8px 10px;
    }
}