/* GTmail.AI - GTpro Style */
:root {
    --bg: #E8E4D8;
    --bg-panel: rgba(255,255,255,0.7);
    --text: #333333;
    --text-muted: #666666;
    --text-light: #999999;
    --border: rgba(51,51,51,0.1);
    --border-dark: rgba(51,51,51,0.2);
    --hover: rgba(51,51,51,0.05);
    --active: #333333;
    --active-text: #E8E4D8;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

/* Layout */
.app { display: flex; height: 100vh; }
.sidebar { width: 220px; background: var(--bg-panel); border-right: 1px solid var(--border); display: flex; flex-direction: column; }
.email-list { width: 350px; background: rgba(255,255,255,0.5); border-right: 1px solid var(--border); display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.emails { flex: 1; overflow-y: auto; min-height: 0; }

/* Logo */
.logo { padding: 20px; border-bottom: 1px solid var(--border); }
.logo h1 { font-size: 20px; font-weight: 400; letter-spacing: 2px; }

/* Buttons */
.btn {
    padding: 10px 20px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--text);
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}
.btn:hover { background: var(--active); color: var(--active-text); }
.btn-compose { margin: 15px; width: calc(100% - 30px); }

/* Folders */
.folders { flex: 1; overflow-y: auto; }
.folder {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(51,51,51,0.03);
}
.folder:hover { background: var(--hover); }
.folder.active { background: var(--active); color: var(--active-text); }
.folder-name { font-size: 14px; }
.folder-count {
    font-size: 12px;
    background: rgba(51,51,51,0.1);
    padding: 2px 8px;
    border-radius: 10px;
}
.folder.active .folder-count { background: rgba(255,255,255,0.2); }

/* User section */
.user-section { padding: 15px; border-top: 1px solid var(--border); }
.user-email { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }

/* Search */
.search { padding: 12px; border-bottom: 1px solid var(--border); }
.search input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-dark);
    border-radius: 4px;
    font-size: 14px;
    background: white;
    font-family: inherit;
}
.search input:focus { outline: none; border-color: var(--text); }

/* Email list */
.email-item {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(51,51,51,0.06);
    cursor: pointer;
    transition: background 0.2s;
}
.email-item:hover { background: var(--hover); }
.email-item.unread { background: rgba(255,255,255,0.8); border-left: 3px solid var(--text); }
.email-item.active { background: rgba(51,51,51,0.08); }
.email-from { font-weight: 600; font-size: 14px; margin-bottom: 3px; display: flex; align-items: center; gap: 8px; }
.email-subject { font-size: 13px; color: var(--text-muted); margin-bottom: 3px; }
.email-preview { font-size: 12px; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.email-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.email-time { font-size: 11px; color: var(--text-light); }

/* Icons */
.icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
    flex-shrink: 0;
}
.icon-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text);
    position: relative;
    transition: all 0.2s;
}
.icon-btn:hover { background: var(--hover); }
.icon-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--active-text);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
}
.has-attachment { color: var(--text-muted); }

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,0.3);
}
.toolbar-divider { width: 1px; height: 24px; background: var(--border-dark); margin: 0 8px; }

/* Email view */
.email-view { flex: 1; background: rgba(255,255,255,0.6); display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.email-header { padding: 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.email-title { font-size: 20px; font-weight: 400; margin-bottom: 12px; }
.email-info { font-size: 13px; color: var(--text-muted); }
.email-body { flex: 1; padding: 20px; overflow-y: auto; font-size: 14px; line-height: 1.8; min-height: 0; }
.email-body iframe { width: 100%; border: none; height: 100%; min-height: 500px; }
.email-body pre { max-height: none; }

/* Empty state */
.empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 15px;
}

/* Login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-box {
    background: var(--bg-panel);
    padding: 50px;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border);
}
.login-box h1 { text-align: center; font-weight: 400; letter-spacing: 2px; margin-bottom: 10px; }
.login-box p { text-align: center; color: var(--text-muted); margin-bottom: 30px; font-size: 14px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-dark);
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
}
.form-group input:focus { outline: none; border-color: var(--text); }
.input-suffix {
    display: flex;
    align-items: center;
}
.input-suffix input { border-radius: 4px 0 0 4px; border-right: none; }
.input-suffix span {
    padding: 12px 14px;
    background: rgba(51,51,51,0.05);
    border: 1px solid var(--border-dark);
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    color: var(--text-muted);
}
.error-msg { color: #c0392b; font-size: 13px; margin-top: 10px; text-align: center; display: none; }
.login-footer { text-align: center; margin-top: 25px; font-size: 12px; color: var(--text-light); }
.login-footer a { color: var(--text); text-decoration: none; }
