/* GoIPpro Ops - Mobile-first CSS */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --white: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: var(--white);
    padding: 32px 24px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 320px;
}

.login-box h1 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    color: var(--gray-700);
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 24px;
}

/* Header */
.page-header {
    background: var(--white);
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h1 {
    font-size: 1.125rem;
    color: var(--primary);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-menu span {
    font-size: 0.875rem;
    color: var(--gray-700);
}

/* Cards */
.card {
    background: var(--white);
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.card h2 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--gray-800);
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--gray-700);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    min-height: 48px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input[readonly] {
    background: var(--gray-200);
    color: var(--gray-700);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    min-height: 44px;
}

.btn-full {
    width: 100%;
}

.btn-small {
    padding: 8px 14px;
    font-size: 0.8rem;
    min-height: 36px;
}

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

.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-800);
}

.btn-secondary:hover { background: var(--gray-300); }

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

.btn-success:hover { background: #16a34a; }

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

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

/* Table */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th,
.table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-100);
}

.table tr:last-child td { border-bottom: none; }

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.bg-gray-200 { background: var(--gray-200); color: var(--gray-700); }
.bg-yellow-100 { background: #fef3c7; color: #92400e; }
.bg-green-100 { background: #dcfce7; color: #166534; }
.bg-red-100 { background: #fee2e2; color: #991b1b; }
.bg-blue-100 { background: #dbeafe; color: #1e40af; }

/* Alerts */
.alert {
    padding: 12px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: var(--gray-700);
    padding: 24px;
    font-size: 0.875rem;
}

/* Entry List */
.entry-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.entry-item {
    background: var(--gray-100);
    padding: 14px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.entry-item.readonly {
    border-left-color: var(--success);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.entry-header strong {
    font-size: 0.95rem;
    color: var(--gray-800);
}

.text-small {
    font-size: 0.75rem;
    color: var(--gray-700);
}

.entry-content {
    margin-bottom: 12px;
}

.entry-content p {
    font-size: 0.875rem;
    margin-bottom: 6px;
}

.entry-content p:last-child { margin-bottom: 0; }

.entry-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Counters */
.counters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.counter-item {
    background: var(--white);
    padding: 16px 12px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.counter-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.counter-label {
    font-size: 0.75rem;
    color: var(--gray-700);
    margin-top: 4px;
}

/* Google Button */
.btn-google {
    background: #fff;
    color: #333;
    border: 1px solid #dadce0;
    font-weight: 500;
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #d2e3fc;
}

.google-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    background: #4285f4;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-300);
}

.divider span {
    padding: 0 12px;
}

/* Login Links */
.login-links {
    margin-top: 16px;
    text-align: center;
}

.login-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.login-links a:hover {
    text-decoration: underline;
}

/* Select */
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    min-height: 48px;
    background: white;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Responsive */
@media (max-width: 480px) {
    .counters {
        grid-template-columns: 1fr;
    }
    .entry-actions {
        flex-direction: column;
    }
    .entry-actions .btn {
        width: 100%;
    }
}